mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-04 23:13:09 +00:00
fix: check relay protocol
This commit is contained in:
parent
0c4ee98c7d
commit
237c679587
@ -12,6 +12,7 @@ import (
|
||||
|
||||
wps "github.com/waku-org/go-waku/waku/v2/peerstore"
|
||||
waku_proto "github.com/waku-org/go-waku/waku/v2/protocol"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/relay"
|
||||
"github.com/waku-org/go-waku/waku/v2/utils"
|
||||
)
|
||||
|
||||
@ -73,7 +74,7 @@ func (pm *PeerManager) SelectRandom(criteria PeerSelectionCriteria) (peer.IDSlic
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(filteredPeers) == 0 {
|
||||
if len(filteredPeers) == 0 && criteria.Proto != relay.WakuRelayID_v200 {
|
||||
return nil, utils.ErrNoPeersAvailable
|
||||
}
|
||||
if len(criteria.PubsubTopics) > 0 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user