From 0e112cc31ac696c1be0e0e8479801e28447691b7 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 12 Sep 2022 14:10:22 -0400 Subject: [PATCH] Island: Wire up event handlers before starting the island server _start_island_server() blocks, so event handlers need to be wired/subscribed before the server starts. --- monkey/monkey_island/cc/server_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/server_setup.py b/monkey/monkey_island/cc/server_setup.py index 3a35538b9..2a946d326 100644 --- a/monkey/monkey_island/cc/server_setup.py +++ b/monkey/monkey_island/cc/server_setup.py @@ -58,11 +58,11 @@ def run_monkey_island(): _send_analytics(deployment, version) container = _initialize_di_container(ip_addresses, version, config_options.data_dir) + setup_island_event_handlers(container) _initialize_mongodb_connection(config_options.start_mongodb, config_options.data_dir) _start_island_server(ip_addresses, island_args.setup_only, config_options, container) - setup_island_event_handlers(container) def _extract_config(island_args: IslandCmdArgs) -> IslandConfigOptions: