mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
waku_node: first of all stop the waku-switch when stopping the waku-node (#2651)
This is aimed to avoid having flaky tests
This commit is contained in:
parent
cd6424be19
commit
bbb32362ca
@ -1217,6 +1217,9 @@ proc start*(node: WakuNode) {.async.} =
|
||||
info "Node started successfully"
|
||||
|
||||
proc stop*(node: WakuNode) {.async.} =
|
||||
## By stopping the switch we are stopping all the underlying mounted protocols
|
||||
await node.switch.stop()
|
||||
|
||||
node.peerManager.stop()
|
||||
|
||||
if not node.wakuRlnRelay.isNil():
|
||||
@ -1228,9 +1231,6 @@ proc stop*(node: WakuNode) {.async.} =
|
||||
if not node.wakuArchive.isNil():
|
||||
await node.wakuArchive.stopWait()
|
||||
|
||||
## By stopping the switch we are stopping all the underlying mounted protocols
|
||||
await node.switch.stop()
|
||||
|
||||
node.started = false
|
||||
|
||||
proc isReady*(node: WakuNode): Future[bool] {.async: (raises: [Exception]).} =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user