i2psnark: Don't disconnect seeds immediately if comments enabled (ticket #2288)

Implement variable timeout
Hardcode handshake bytes
Log tweaks
This commit is contained in:
zzz
2018-07-31 14:13:33 +00:00
parent a51d260a78
commit 5c3e408772
4 changed files with 47 additions and 15 deletions

View File

@@ -96,7 +96,7 @@ class PeerCheckerTask implements Runnable
continue;
}
if (peer.getInactiveTime() > PeerCoordinator.MAX_INACTIVE) {
if (peer.getInactiveTime() > peer.getMaxInactiveTime()) {
if (_log.shouldLog(Log.WARN))
_log.warn("Disconnecting peer idle " +
DataHelper.formatDuration(peer.getInactiveTime()) + ": " + peer);