From 3ebaffa2c12b9cf8604f36c3637877d1accf6cec Mon Sep 17 00:00:00 2001 From: subtly Date: Thu, 30 Apr 2015 17:02:14 +0100 Subject: [PATCH] revert assumption that node exists in nodetable when noteactivenode is called --- libp2p/NodeTable.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libp2p/NodeTable.cpp b/libp2p/NodeTable.cpp index 24380a10e..845d892a1 100644 --- a/libp2p/NodeTable.cpp +++ b/libp2p/NodeTable.cpp @@ -309,11 +309,12 @@ void NodeTable::noteActiveNode(Public const& _pubk, bi::udp::endpoint const& _en return; shared_ptr node = nodeEntry(_pubk); - node->endpoint.address = _endpoint.address(); - node->endpoint.udpPort = _endpoint.port(); if (!!node && !node->pending) { clog(NodeTableConnect) << "Noting active node:" << _pubk << _endpoint.address().to_string() << ":" << _endpoint.port(); + node->endpoint.address = _endpoint.address(); + node->endpoint.udpPort = _endpoint.port(); + shared_ptr contested; { Guard l(x_state);