From b80ef73bf7ac9043f9b34a09c09ae200426fcb0b Mon Sep 17 00:00:00 2001 From: Viacheslav Gonkivskyi Date: Tue, 2 Apr 2024 19:39:54 +0300 Subject: [PATCH] fix(p2p): use CloseRead instead of stream.Close --- p2p/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/helpers.go b/p2p/helpers.go index 2e4df655..dc8cc1c5 100644 --- a/p2p/helpers.go +++ b/p2p/helpers.go @@ -103,7 +103,7 @@ func sendMessage( } if err == nil { - if closeErr := stream.Close(); closeErr != nil { + if closeErr := stream.CloseRead(); closeErr != nil { log.Errorw("closing stream", "err", closeErr) } } else {