mirror of https://github.com/waku-org/nwaku.git
chore: do not mount relay more than once (#1650)
This commit is contained in:
parent
e931fa5dc8
commit
5d853b8630
|
@ -413,6 +413,10 @@ proc mountRelay*(node: WakuNode,
|
|||
topics: seq[string] = @[],
|
||||
triggerSelf = true,
|
||||
peerExchangeHandler = none(RoutingRecordsHandler)) {.async, gcsafe.} =
|
||||
if not node.wakuRelay.isNil():
|
||||
error "wakuRelay already mounted, skipping"
|
||||
return
|
||||
|
||||
## The default relay topics is the union of all configured topics plus default PubsubTopic(s)
|
||||
info "mounting relay protocol"
|
||||
|
||||
|
|
Loading…
Reference in New Issue