diff --git a/nano/node/transport/tcp_listener.cpp b/nano/node/transport/tcp_listener.cpp index 368279e95d..511b270f8b 100644 --- a/nano/node/transport/tcp_listener.cpp +++ b/nano/node/transport/tcp_listener.cpp @@ -370,6 +370,7 @@ asio::ip::tcp::endpoint nano::transport::tcp_listener::endpoint () const { if (!stopped) { + nano::lock_guard lock{ mutex }; return { asio::ip::address_v6::loopback (), acceptor.local_endpoint ().port () }; } else