mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
fix panic for empty node addresses
This commit is contained in:
parent
de0cb12354
commit
0d0381cc42
1 changed files with 3 additions and 0 deletions
|
@ -85,6 +85,9 @@ func (c *nodeConf) CoordinatorPeers() []string {
|
|||
|
||||
func (c *nodeConf) PeerAddresses(peerId string) (addrs []string, ok bool) {
|
||||
addrs, ok = c.addrs[peerId]
|
||||
if ok && len(addrs) == 0 {
|
||||
return nil, false
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue