Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #20 from libp2p/fix/full-close
Browse files Browse the repository at this point in the history
full close the autonat stream
  • Loading branch information
Stebalien authored Apr 9, 2019
2 parents ff52608 + a5e3ff0 commit bcaff01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func NewAutoNATService(ctx context.Context, h host.Host, opts ...libp2p.Option)
}

func (as *AutoNATService) handleStream(s inet.Stream) {
defer s.Close()
defer inet.FullClose(s)

pid := s.Conn().RemotePeer()
log.Debugf("New stream from %s", pid.Pretty())
Expand Down

0 comments on commit bcaff01

Please sign in to comment.