about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-18 02:48:37 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-18 02:48:37 +0100
commitc84d9e84d4233daf242c6b72c11c51c80ff32315 (patch)
treefda36495d0eb9e0b3f97ec98f576353acc043097 /src/local/client.nim
parent6a0308642d952f56fee549cf908ee5d0bbc5df3e (diff)
downloadchawan-c84d9e84d4233daf242c6b72c11c51c80ff32315.tar.gz
client: fix EOF error for estream
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 2912b7ef..291e1b0d 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -352,6 +352,8 @@ proc handleRead(client: Client, fd: int) =
     while true:
       try:
         let n = estream.recvData(addr buffer[0], BufferSize)
+        if n == 0:
+          break
         var i = 0
         while i < n:
           var j = n