Fix a crash that would sometimes happen in debug builds at handshakes (#3459)

This commit is contained in:
theohax 2021-09-20 17:54:05 +03:00 committed by GitHub
commit 5c66c28dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -538,7 +538,7 @@ void nano::transport::tcp_channels::start_tcp (nano::endpoint const & endpoint_a
nano::node_id_handshake message (node_l->network_params.network, cookie, boost::none);
if (node_l->config.logging.network_node_id_handshake_logging ())
{
node_l->logger.try_log (boost::str (boost::format ("Node ID handshake request sent with node ID %1% to %2%: query %3%") % node_l->node_id.pub.to_node_id () % endpoint_a % (*cookie).to_string ()));
node_l->logger.try_log (boost::str (boost::format ("Node ID handshake request sent with node ID %1% to %2%: query %3%") % node_l->node_id.pub.to_node_id () % endpoint_a % (cookie.has_value() ? cookie->to_string() : "not set")));
}
channel->set_endpoint ();
std::shared_ptr<std::vector<uint8_t>> receive_buffer (std::make_shared<std::vector<uint8_t>> ());