From 938a601b778ac5c187ce212dc99eb8bdf3636a42 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Fri, 2 Mar 2018 11:54:21 +0000 Subject: [PATCH] Minor comment changes --- src/server/serverdispatch.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/server/serverdispatch.nim b/src/server/serverdispatch.nim index bf6cda3..1effab0 100644 --- a/src/server/serverdispatch.nim +++ b/src/server/serverdispatch.nim @@ -20,8 +20,7 @@ proc processMessage(server: RpcServer, client: AsyncSocket, line: string) {.asyn if not server.procs.hasKey(methodName): await client.sendError(METHOD_NOT_FOUND, "Method not found", id, %(methodName & " is not a registered method.")) else: - # TODO: Performance or other effects from NOT calling rpc with await? - let callRes = server.procs[methodName](node["params"]) + let callRes = server.procs[methodName](node["params"]) # TODO: Performance or other effects from NOT calling rpc with await? await client.send($wrapReply(id, callRes, newJNull()) & "\c\l") proc processClient(server: RpcServer, client: AsyncSocket) {.async.} = @@ -39,8 +38,7 @@ proc processClient(server: RpcServer, client: AsyncSocket) {.async.} = await fut if fut.failed: if fut.readError of RpcProcError: - # This error signifies that the proc wants us to respond with a custom - # error object. + # TODO: Currently exceptions in rpc calls are not properly handled let err = fut.readError.RpcProcError await client.sendError(err.code, err.msg, err.data) else: