Skip to content

Commit

Permalink
DISABLE SOCKET CLOSE
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 12, 2024
1 parent 87468b0 commit daea4f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nano/node/transport/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -433,6 +435,10 @@ bool nano::transport::socket::write_queue::empty () const
});
}

/*
* socket_functions
*/

boost::asio::ip::network_v6 nano::transport::socket_functions::get_ipv6_subnet_address (boost::asio::ip::address_v6 const & ip_address, std::size_t network_prefix)
{
return boost::asio::ip::make_network_v6 (ip_address, static_cast<unsigned short> (network_prefix));
Expand Down

0 comments on commit daea4f3

Please sign in to comment.