can't use `result` when returning Future[void]

This commit is contained in:
Ștefan Talpalaru 2020-08-06 20:01:32 +02:00
parent 244254632b
commit d90bdb679b
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ proc processClient(server: StreamServer, transport: StreamTransport) {.async, gc
var rpc = getUserData[RpcSocketServer](server)
while true:
var
maxRequestLength = defaultMaxRequestLength
value = await transport.readLine(defaultMaxRequestLength)
if value == "":
await transport.closeWait()
@ -28,7 +27,7 @@ proc processClient(server: StreamServer, transport: StreamTransport) {.async, gc
debug "Processing message", address = transport.remoteAddress(), line = value
let res = await rpc.route(value)
result = transport.write(res)
discard await transport.write(res)
# Utility functions for setting up servers using stream transport addresses