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-07 13:15:17 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-07 13:19:02 +0200
commitd78298ae3369374bf7bf31592513d112c75a9601 (patch)
treee8daf184adb0b09d48d53bf123f23a5d2a7b8d86 /src/display/client.nim
parentc15d04041b1b8660000a1517b9d4bfc06f2cb490 (diff)
downloadchawan-d78298ae3369374bf7bf31592513d112c75a9601.tar.gz
Clean up stream error handling
* sread now raises EOFError if readData returns too few bytes
* buffer handleError ignores unregistered fds like client
* client handleError ignores unregistered fds like buffer
Diffstat (limited to 'src/display/client.nim')
-rw-r--r--src/display/client.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/display/client.nim b/src/display/client.nim
index 456ca502..98b8d7b7 100644
--- a/src/display/client.nim
+++ b/src/display/client.nim
@@ -295,6 +295,8 @@ proc handleRead(client: Client, fd: int) =
   elif fd in client.loader.ongoing:
     #TODO something with readablestream?
     discard
+  elif fd in client.loader.unregistered:
+    discard # ignore
   else:
     let container = client.fdmap[fd]
     client.pager.handleEvent(container)