Fixed gcsafe in asynchttpserver module.
This commit is contained in:
parent
014b79617e
commit
2dff5ef718
1 changed files with 3 additions and 2 deletions
|
|
@ -97,7 +97,8 @@ proc sendStatus(client: PAsyncSocket, status: string): PFuture[void] =
|
||||||
client.send("HTTP/1.1 " & status & "\c\L")
|
client.send("HTTP/1.1 " & status & "\c\L")
|
||||||
|
|
||||||
proc processClient(client: PAsyncSocket, address: string,
|
proc processClient(client: PAsyncSocket, address: string,
|
||||||
callback: proc (request: TRequest): PFuture[void]) {.async.} =
|
callback: proc (request: TRequest):
|
||||||
|
PFuture[void] {.closure, gcsafe.}) {.async.} =
|
||||||
while true:
|
while true:
|
||||||
# GET /path HTTP/1.1
|
# GET /path HTTP/1.1
|
||||||
# Header: val
|
# Header: val
|
||||||
|
|
@ -184,7 +185,7 @@ proc processClient(client: PAsyncSocket, address: string,
|
||||||
break
|
break
|
||||||
|
|
||||||
proc serve*(server: PAsyncHttpServer, port: TPort,
|
proc serve*(server: PAsyncHttpServer, port: TPort,
|
||||||
callback: proc (request: TRequest): PFuture[void] {.gcsafe.},
|
callback: proc (request: TRequest): PFuture[void] {.closure,gcsafe.},
|
||||||
address = "") {.async.} =
|
address = "") {.async.} =
|
||||||
## Starts the process of listening for incoming HTTP connections on the
|
## Starts the process of listening for incoming HTTP connections on the
|
||||||
## specified address and port.
|
## specified address and port.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue