From 250a23c6dbf6a658d094e297ce4ac3fa254879f2 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sun, 3 Dec 2017 14:24:53 -0800 Subject: [PATCH] close connections we fail to dial The previous commit did this for connections we accept but I forgot to do this for dialed connections. --- p2p/transport/websocket/dialer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/p2p/transport/websocket/dialer.go b/p2p/transport/websocket/dialer.go index 4c74df39d7..7a5a91579a 100644 --- a/p2p/transport/websocket/dialer.go +++ b/p2p/transport/websocket/dialer.go @@ -28,6 +28,7 @@ func (d *dialer) DialContext(ctx context.Context, raddr ma.Multiaddr) (tpt.Conn, mnc, err := manet.WrapNetConn(NewConn(wscon, nil)) if err != nil { + wscon.Close() return nil, err }