From a5e3ff099a9ea66d387de7f3c2c40579af19c396 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 9 Apr 2019 15:22:13 -0700 Subject: [PATCH] full close the autonat stream This is ridiculous but we need to fix the interfaces... --- svc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svc.go b/svc.go index bd704be..febae7a 100644 --- a/svc.go +++ b/svc.go @@ -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())