From d6d1f8512d1ecb96034e081bd0cbe9d802b6faa2 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Thu, 8 Feb 2018 13:08:11 +0400 Subject: [PATCH] do not reset pingTimer don't bother with this "only ping when we havent heard from them". lets just always ping every peer from the sendRoutine every 10s no matter what. if they dont pong within pongTimeout, disconnect :) --- p2p/conn/connection.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/p2p/conn/connection.go b/p2p/conn/connection.go index c23ed7f82..6b4912502 100644 --- a/p2p/conn/connection.go +++ b/p2p/conn/connection.go @@ -494,11 +494,6 @@ FOR_LOOP: c.stopForError(err) break FOR_LOOP } - - // TODO: don't bother with this "only ping when we havent heard from them". - // lets just always ping every peer from the sendRoutine every 10s no matter what. - // if they dont pong within pongTimeout, disconnect :) - c.pingTimer.Reset() } // Cleanup