Skip to content

Commit

Permalink
chore: do not mount relay more than once (#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrevuelta authored Apr 5, 2023
1 parent e931fa5 commit 5d853b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions waku/v2/node/waku_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 5d853b8

Please sign in to comment.