File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,16 @@ proc main() {.async.} =
6969 await saro.start ()
7070 await raya.start ()
7171
72- await sleepAsync (5 .seconds)
72+ await sleepAsync (10 .seconds)
7373
7474 # Perform OOB Introduction: Raya -> Saro
7575 let raya_bundle = raya.createIntroBundle ()
7676 discard await saro.newPrivateConversation (raya_bundle)
7777
7878 await sleepAsync (20 .seconds) # Run for some time
7979
80- saro.stop ()
81- raya.stop ()
80+ await saro.stop ()
81+ await raya.stop ()
8282
8383
8484when isMainModule :
Original file line number Diff line number Diff line change @@ -106,10 +106,6 @@ proc getSelectedConvo(app: ChatApp): ptr ConvoInfo =
106106
107107proc createChatClient (name: string ): Future [Client ] {.async .} =
108108 var cfg = await getCfg (name)
109- # for key, val in fetchRegistrations():
110- # if key != name:
111- # cfg.waku.staticPeers.add(val)
112-
113109 result = newClient (cfg.waku, cfg.ident)
114110
115111
Original file line number Diff line number Diff line change @@ -291,8 +291,8 @@ proc start*(client: Client) {.async.} =
291291
292292 notice " Client start complete" , client = client.getId ()
293293
294- proc stop * (client: Client ) =
294+ proc stop * (client: Client ) {. async .} =
295295 # # Stop the client.
296- client.ds.stop ()
296+ await client.ds.stop ()
297297 client.isRunning = false
298298 notice " Client stopped" , client = client.getId ()
Original file line number Diff line number Diff line change @@ -206,3 +206,6 @@ proc getConnectedPeerCount*(client: WakuClient): int =
206206 if peerInfo.connectedness == Connected :
207207 inc count
208208 return count
209+
210+ proc stop * (client: WakuClient ) {.async .} =
211+ await client.node.stop ()
You can’t perform that action at this time.
0 commit comments