From b4161d87b3ffa521f17ed02f82aeb4a0e0e1e759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:45:00 +0100 Subject: [PATCH] DISABLE SOCKET CLOSE --- nano/node/transport/socket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nano/node/transport/socket.cpp b/nano/node/transport/socket.cpp index 4271905534..e16161307a 100644 --- a/nano/node/transport/socket.cpp +++ b/nano/node/transport/socket.cpp @@ -36,7 +36,7 @@ nano::transport::socket::socket (nano::node & node_a, endpoint_type_t endpoint_t nano::transport::socket::~socket () { - close_internal (); + // close_internal (); } void nano::transport::socket::start () @@ -320,6 +320,8 @@ void nano::transport::socket::close () // This must be called from a strand or the destructor void nano::transport::socket::close_internal () { + debug_assert (strand.running_in_this_thread ()); + if (closed.exchange (true)) { return;