Browse Source

fix reuseConn counting when creating the quic.Listener errors

pull/1424/head
Marten Seemann 4 years ago
parent
commit
81afd82a00
  1. 7
      p2p/transport/quic/transport.go

7
p2p/transport/quic/transport.go

@ -221,7 +221,12 @@ func (t *transport) Listen(addr ma.Multiaddr) (tpt.Listener, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return newListener(conn, t, t.localPeer, t.privKey, t.identity) ln, err := newListener(conn, t, t.localPeer, t.privKey, t.identity)
if err != nil {
conn.DecreaseCount()
return nil, err
}
return ln, nil
} }
// Proxy returns true if this transport proxies. // Proxy returns true if this transport proxies.

Loading…
Cancel
Save