mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 14:28:02 +08:00
panic -> error
This commit is contained in:
parent
9338caa9d8
commit
e9e13f7fea
@ -397,7 +397,7 @@ func (s *Swarm) GetConnection(id peer.ID, addr *ma.Multiaddr) (*peer.Peer, error
|
||||
}
|
||||
|
||||
if id.Equal(s.local.ID) {
|
||||
panic("Attempted connection to self!")
|
||||
return nil, errors.New("Attempted connection to self!")
|
||||
}
|
||||
|
||||
conn, err, reused := s.Dial(p)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user