Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

full close the autonat stream #20

Merged
merged 1 commit into from
Apr 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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