Skip to content

Commit

Permalink
Use scanner_connection_retry for running task
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Mar 17, 2021
1 parent 9c5893e commit 0c96d26
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -3567,7 +3567,7 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id)
int rc, port;
scanner_t scanner;
gboolean started, queued_status_updated;
int retry;
int retry, connection_retry;

scanner = task_scanner (task);
host = scanner_host (scanner);
Expand All @@ -3577,8 +3577,9 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id)
key_priv = scanner_key_priv (scanner);
started = FALSE;
queued_status_updated = FALSE;
connection_retry = get_scanner_connection_retry ();

retry = 3;
retry = connection_retry;
while (1 && retry >= 0)
{
int run_status, progress;
Expand Down Expand Up @@ -3718,7 +3719,7 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id)
}
}

retry = 3;
retry = connection_retry;
gvm_sleep (5);
}

Expand Down

0 comments on commit 0c96d26

Please sign in to comment.