Add bool to determine if socket has been closed.
This commit is contained in:
parent
33b9ab47d9
commit
efca06c71c
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue