1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 17:36:38 +08:00

handshake catch

This commit is contained in:
Juan Batiz-Benet
2014-09-26 23:58:44 -07:00
parent 198b6e2bae
commit c7bd8b78dd

View File

@ -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.
}