Re: Killing an AsyncHttpServer

2017-09-09 Thread def_pri_pub
Yeah, I have the killServer = true in a block somewhere. Adding return after server.close() does work, but I need to mark server with {.threadsafe.}. It also causes an issue with the HTTP Request (on the browser side) doesn't get finished and just hangs. Interestingly enough this doesn't

Re: Killing an AsyncHttpServer

2017-09-06 Thread enthus1ast
try returning after server.close Edit: also this is this bug [https://github.com/nim-lang/Nim/issues/6186](https://github.com/nim-lang/Nim/issues/6186) Edit2: do you set killServer = true in your code?

Re: Killing an AsyncHttpServer

2017-09-06 Thread def_pri_pub
It now compiles successfully, but it doesn't seem to be killing the server when I trip that killServer block. It will run over the line and continue on with execution.

Re: Killing an AsyncHttpServer

2017-09-05 Thread Tiberium
Try to add gcsafe pragma to your proc

Killing an AsyncHttpServer

2017-09-05 Thread def_pri_pub
So I've got some code like this: import asyncDispatch import asynchttpserver # Create the server object and state data var server = newAsyncHttpServer() let port = 8000 # ... proc handleRequest(req: Request) {.async.}= ## Handle an