Add bool to determine if socket has been closed.

This commit is contained in:
Dominik Picheta 2014-09-16 16:37:53 +01:00
commit efca06c71c
2 changed files with 4 additions and 2 deletions

View file

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