1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 17:03:58 +08:00

p2p/net/conn/Listener: ignore conns failed to secure

Instead of erroring out, which would break the listener,
we instead log a message and continue. This is not an error,
the internet is a place with lots of probing + connection
failures.
This commit is contained in:
Juan Batiz-Benet
2015-01-11 12:05:13 -08:00
parent 4525269cd8
commit b7a4e92121

View File

@ -87,10 +87,8 @@ func (l *listener) Accept() (net.Conn, error) {
}
sc, err := newSecureConn(ctx, l.privk, c)
if err != nil {
if catcher.IsTemporary(err) {
continue
}
return nil, err
log.Info("ignoring conn we failed to secure: %s %s", err, sc)
continue
}
return sc, nil
}