Skip to content

Commit

Permalink
don't defer the closing of the hole punching stream
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Sep 3, 2021
1 parent c7c61b5 commit f7d9920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/protocol/holepunch/coordination.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (hs *Service) handleNewStream(s network.Stream) {
hs.handlerError(rp, fmt.Errorf("expected SYNC message from initiator but got %d", t))
return
}
defer s.Close()
s.Close()

// Hole punch now by forcing a connect
pi := peer.AddrInfo{
Expand Down

0 comments on commit f7d9920

Please sign in to comment.