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 
actually stop the application then and there. It's if I try to send a request 
after killServer = true that it will end the program with this output:
    
    
    Traceback (most recent call last)
    Server.nim(76)           Server
    asyncdispatch.nim(1010)  waitFor
    asyncdispatch.nim(1013)  poll
    Error: unhandled exception: No handles or timers registered in dispatcher. 
[ValueError]
    

Reply via email to