summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index f8de7908..08b08fc1 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -415,11 +415,9 @@ Node::ReasonForTermination Node::run()
if ((now - lastPingCheck) >= ZT_PING_CHECK_DELAY) {
lastPingCheck = now;
try {
- if (_r->topology->isSupernode(_r->identity.address())) {
- // The only difference in how supernodes behave is here: they only
- // actively ping each other and only passively listen for pings
- // from anyone else. They also don't send firewall openers, since
- // they're never firewalled.
+ if (_r->topology->amSupernode()) {
+ // Supernodes do not ping anyone but each other. They also don't
+ // send firewall openers, since they aren't ever firewalled.
std::vector< SharedPtr<Peer> > sns(_r->topology->supernodePeers());
for(std::vector< SharedPtr<Peer> >::const_iterator p(sns.begin());p!=sns.end();++p) {
if ((now - (*p)->lastDirectSend()) > ZT_PEER_DIRECT_PING_DELAY)