From 28ce222e235f237696af27429e72c0a6b47a00bf Mon Sep 17 00:00:00 2001 From: coffeepots Date: Tue, 19 Jun 2018 18:17:12 +0100 Subject: [PATCH] Client now should fail the future on errors --- rpc/client.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/client.nim b/rpc/client.nim index e4bb85b..c8ef0b2 100644 --- a/rpc/client.nim +++ b/rpc/client.nim @@ -79,7 +79,7 @@ proc processMessage(self: RpcClient, line: string) = self.awaiting.del(id) # TODO: actions on unable find result node else: - self.awaiting[id].complete((true, errorNode)) + self.awaiting[id].fail(newException(ValueError, $errorNode)) self.awaiting.del(id) proc connect*(self: RpcClient, address: string, port: Port): Future[void]