From 2511cedcc930fbe2d481892f9a94a6d2855ad9d9 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 c8d3b21c..f2dcddb6 100644 --- a/p2p/helpers.go +++ b/p2p/helpers.go @@ -105,7 +105,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 {