summary refs log tree commit diff stats
path: root/lib/pure/asynchttpserver.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/asynchttpserver.nim')
-rw-r--r--lib/pure/asynchttpserver.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim
index 9de0a6268..257fbaeb5 100644
--- a/lib/pure/asynchttpserver.nim
+++ b/lib/pure/asynchttpserver.nim
@@ -116,7 +116,7 @@ proc sendStatus(client: PAsyncSocket, status: string): Future[void] =
 proc processClient(client: PAsyncSocket, address: string,
                    callback: proc (request: TRequest):
                       Future[void] {.closure, gcsafe.}) {.async.} =
-  while true:
+  while not client.closed:
     # GET /path HTTP/1.1
     # Header: val
     # \n