Skip to content

Commit 4bf399f

Browse files
authored
Merge pull request #361 from spiderxm/fix-network-capture
fix - kill network capture process if any container is killed
2 parents 96ff6ea + b38ed0f commit 4bf399f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/load.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,17 @@ def wait_until_interrupt(virtual_machine_container_reset_factory_time_seconds, c
362362
# start containers based on selected modules
363363
start_containers(configuration)
364364
if not new_network_events_thread.is_alive():
365-
return error(messages["interrupt_application"])
365+
error(messages["interrupt_application"])
366+
new_network_events_thread.terminate()
367+
break
366368
if containers_are_unhealthy(configuration):
367-
return error(
369+
error(
368370
"Interrupting the application because \"{0}\" container(s) is(are) not alive!".format(
369371
", ".join(containers_are_unhealthy(configuration))
370372
)
371373
)
374+
new_network_events_thread.terminate()
375+
break
372376
if run_as_test:
373377
break
374378
except KeyboardInterrupt:

0 commit comments

Comments
 (0)