Skip to content

Commit

Permalink
fix: remove an unnecessary goroutine
Browse files Browse the repository at this point in the history
The stream handler runs in a goroutine anyways. We might as well block it.
  • Loading branch information
Stebalien committed Mar 2, 2020
1 parent 7ba3222 commit 6cdc404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/protocol/identify/id_delta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6cdc404

Please sign in to comment.