From 14a37349c09a7445015cd1465398dfb3432eda42 Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Wed, 2 Nov 2022 22:55:11 +0000 Subject: [PATCH] Close ping stream when we exit the loop (#1853) --- p2p/protocol/ping/ping.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/protocol/ping/ping.go b/p2p/protocol/ping/ping.go index 583eea5c32..6ff5c3fb6f 100644 --- a/p2p/protocol/ping/ping.go +++ b/p2p/protocol/ping/ping.go @@ -71,7 +71,7 @@ func (p *PingService) PingHandler(s network.Stream) { log.Error("ping loop failed without error") } } - s.Reset() + s.Close() }() for {