From 6cdc40418044dc96a9a90aefb0cc24faff647ffe Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 2 Mar 2020 15:51:36 -0800 Subject: [PATCH] fix: remove an unnecessary goroutine The stream handler runs in a goroutine anyways. We might as well block it. --- p2p/protocol/identify/id_delta.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/protocol/identify/id_delta.go b/p2p/protocol/identify/id_delta.go index 2cc95b72..947cc8c8 100644 --- a/p2p/protocol/identify/id_delta.go +++ b/p2p/protocol/identify/id_delta.go @@ -25,7 +25,8 @@ func (ids *IDService) deltaHandler(s network.Stream) { return } - defer func() { go helpers.FullClose(s) }() + defer helpers.FullClose(s) + log.Debugf("%s received message from %s %s", s.Protocol(), c.RemotePeer(), c.RemoteMultiaddr()) delta := mes.GetDelta()