Fix processing of 'await' with a nnkCall.
Specifically, ``discard readMessages(disp, await disp.accept(server))`` works now, i.e. using 'await' as one of the params to a proc call.
This commit is contained in:
parent
cac39b27cf
commit
17ef758cc3
2 changed files with 12 additions and 9 deletions
|
|
@ -52,8 +52,7 @@ proc createServer(disp: PDispatcher, port: TPort): PFuture[int] {.async.} =
|
|||
server.bindAddr(port)
|
||||
server.listen()
|
||||
while true:
|
||||
var client = await disp.accept(server)
|
||||
discard readMessages(disp, client)
|
||||
discard readMessages(disp, await disp.accept(server))
|
||||
|
||||
discard disp.createServer(TPort(10335))
|
||||
discard disp.launchSwarm(TPort(10335))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue