Skip to content

Commit

Permalink
Stop network component last
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Mar 17, 2024
1 parent 8bfb8af commit 0d61dba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nano/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ void nano::node::stop ()
generator.stop ();
final_generator.stop ();
confirmation_height_processor.stop ();
network.stop ();
telemetry.stop ();
websocket.stop ();
bootstrap_server.stop ();
Expand All @@ -696,6 +695,8 @@ void nano::node::stop ()
epoch_upgrader.stop ();
workers.stop ();
local_block_broadcaster.stop ();
network.stop (); // Stop network last to avoid killing in-use sockets

// work pool is not stopped on purpose due to testing setup
}

Expand Down

0 comments on commit 0d61dba

Please sign in to comment.