summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-04-03 16:19:41 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-04-03 16:19:41 -0700
commit158002d2d1603eea6336cb316b80e1c4b9ef7b10 (patch)
tree63dbf1254ecf2f1b742ec223fe71c43c79e1595a /node/Node.cpp
parentc96d3ebf8cbcc639c194a69ce9dc299a55e2bfbe (diff)
downloadinfinitytier-158002d2d1603eea6336cb316b80e1c4b9ef7b10.tar.gz
infinitytier-158002d2d1603eea6336cb316b80e1c4b9ef7b10.zip
Tweak some timings and stuff.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index bc01378d..b87195b1 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -598,12 +598,12 @@ Node::ReasonForTermination Node::run()
}
if (resynchronize) {
- /* If resynchronizing, forget P2P links to all peers and then send
- * something to formerly active ones. This will relay via a supernode
- * which will trigger a new RENDEZVOUS and a new hole punch. This
- * functor excludes supernodes, which are pinged separately above. */
- _r->topology->eachPeer(Topology::ResetActivePeers(_r,now));
+ /* Send NOP to all peers on resynchronize, directly to supernodes and
+ * indirectly to regular nodes (to trigger RENDEZVOUS). Also clear
+ * learned paths since they're likely no longer valid, and close
+ * TCP sockets since they're also likely invalid. */
_r->sm->closeTcpSockets();
+ _r->topology->eachPeer(Topology::ResetActivePeers(_r,now));
} else {
/* Periodically check for changes in our local multicast subscriptions
* and broadcast those changes to directly connected peers. */