Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0vity committed Mar 26, 2024
1 parent 5671ccd commit f932b0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nano/node/transport/tcp_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ void nano::transport::tcp_listener::stop ()
}
condition.notify_all ();

acceptor.cancel(); // Cancel any outstanding asynchronous operations
acceptor.close ();
// Schedule the acceptor to be closed on the IO context
boost::asio::post(acceptor.get_executor(), [this]() {
acceptor.close();
});

if (thread.joinable ())
{
Expand Down

0 comments on commit f932b0e

Please sign in to comment.