Client now should fail the future on errors

This commit is contained in:
coffeepots 2018-06-19 18:17:12 +01:00
parent c162f24253
commit 28ce222e23

View File

@ -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]