about summary refs log tree commit diff stats
path: root/src/display/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-13 01:44:55 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-13 01:44:55 +0200
commiteff1e064fde12fd6976919ca76b56c124231b31a (patch)
tree6df43f3cbbbb340e78b47be6334fe1ef7000e5c5 /src/display/client.nim
parent3a245434cd4bd75a56700ed7814f78699e3a3dd7 (diff)
downloadchawan-eff1e064fde12fd6976919ca76b56c124231b31a.tar.gz
Make Result.text, json return promise
Diffstat (limited to 'src/display/client.nim')
-rw-r--r--src/display/client.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/display/client.nim b/src/display/client.nim
index d3878e49..9783650f 100644
--- a/src/display/client.nim
+++ b/src/display/client.nim
@@ -293,8 +293,7 @@ proc handleRead(client: Client, fd: int) =
     client.loader.onConnected(fd)
     client.runJSJobs()
   elif fd in client.loader.ongoing:
-    #TODO something with readablestream?
-    discard
+    client.loader.onRead(fd)
   elif fd in client.loader.unregistered:
     discard # ignore
   else:
@@ -317,8 +316,7 @@ proc handleError(client: Client, fd: int) =
     #TODO handle error?
     discard
   elif fd in client.loader.ongoing:
-    #TODO something with readablestream?
-    discard
+    client.loader.onError(fd)
   elif fd in client.loader.unregistered:
     discard # already unregistered...
   else: