diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-17 16:31:58 -0800 | 
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-17 16:31:58 -0800 | 
| commit | 1615ef1114de4627e6952d96c62c1d561f8bd03c (patch) | |
| tree | aa41873eb3edf033b09a00f756719109fef5ebcf /node/Node.cpp | |
| parent | bf8d71e82c27eae1e47bde411054f5258df29146 (diff) | |
| download | infinitytier-1615ef1114de4627e6952d96c62c1d561f8bd03c.tar.gz infinitytier-1615ef1114de4627e6952d96c62c1d561f8bd03c.zip | |
Rename getBestRoot() etc.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/node/Node.cpp b/node/Node.cpp index c05a1850..add3117e 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -211,8 +211,7 @@ public:  		}  		if (upstream) { -			// "Upstream" devices are roots and relays and get special treatment -- they stay alive -			// forever and we try to keep (if available) both IPv4 and IPv6 channels open to them. +			// We keep connections to upstream peers alive forever.  			bool needToContactIndirect = true;  			if (p->doPingAndKeepalive(_now,AF_INET)) {  				needToContactIndirect = false; @@ -231,11 +230,8 @@ public:  				}  			} +			// If we don't have a direct path or a static endpoint, send something indirectly to find one.  			if (needToContactIndirect) { -				// If this is an upstream and we have no stable endpoint for either IPv4 or IPv6, -				// send a NOP indirectly if possible to see if we can get to this peer in any -				// way whatsoever. This will e.g. find network preferred relays that lack -				// stable endpoints by using root servers.  				Packet outp(p->address(),RR->identity.address(),Packet::VERB_NOP);  				RR->sw->send(outp,true);  			} | 
