From d90bdb679bd3d81a4e3a887e14f8ee5caa4fa177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 6 Aug 2020 20:01:32 +0200 Subject: [PATCH] can't use `result` when returning Future[void] --- json_rpc/servers/socketserver.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/json_rpc/servers/socketserver.nim b/json_rpc/servers/socketserver.nim index ce2d518..adc539e 100644 --- a/json_rpc/servers/socketserver.nim +++ b/json_rpc/servers/socketserver.nim @@ -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