Skip to content

Commit ff97463

Browse files
jjnicolamergify[bot]
authored andcommitted
Change: adjust the call to stop_scan_cleanup to pass the pid as argument
(cherry picked from commit cfe9802)
1 parent f60dfb8 commit ff97463

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ospd_openvas/daemon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ def exec_scan(self, scan_id: str):
11711171
while kbdb.get_status(scan_id) == 'new':
11721172
res = openvas_process.poll()
11731173
if res and res < 0:
1174-
self.stop_scan_cleanup(kbdb, scan_id, openvas_process)
1174+
self.stop_scan_cleanup(kbdb, scan_id, openvas_process.pid)
11751175
logger.error(
11761176
'It was not possible run the task %s, since openvas ended '
11771177
'unexpectedly with errors during launching.',
@@ -1198,7 +1198,7 @@ def exec_scan(self, scan_id: str):
11981198
if scan_stopped:
11991199
logger.debug('%s: Scan stopped by the client', scan_id)
12001200

1201-
self.stop_scan_cleanup(kbdb, scan_id, openvas_process)
1201+
self.stop_scan_cleanup(kbdb, scan_id, openvas_process.pid)
12021202

12031203
# clean main_db, but wait for scanner to finish.
12041204
while not kbdb.target_is_finished(scan_id):

0 commit comments

Comments
 (0)