mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
handshake catch
This commit is contained in:
@ -347,7 +347,7 @@ func getOrConstructPeer(peers peer.Peerstore, rpk ci.PubKey) (*peer.Peer, error)
|
||||
}
|
||||
|
||||
npeer, err := peers.Get(rid)
|
||||
if err != nil {
|
||||
if err != nil || npeer == nil {
|
||||
if err != peer.ErrNotFound {
|
||||
return nil, err // unexpected error happened.
|
||||
}
|
||||
|
Reference in New Issue
Block a user