dom96 / jester

A sinatra-like web framework for Nim.
MIT License
1.57k stars 120 forks source link

Use async to fix asynchttpserver #236

Closed zedeus closed 4 years ago

zedeus commented 4 years ago

This fixes the "Bad file descriptor" error when running asynchttpserver behind an nginx instance. There might be some more serious underlying issue causing this, but for now I see it as Jester using asynchttpserver incorrectly which is fixed in this pr. Tested with both asynchttpserver and httpbeast.

zedeus commented 4 years ago

Alright, got rid of {.async.} but kept the futures since that's needed to return the final send future to asynchttpserver so it can be awaited. I'm not sure if this solves the problem of heap allocations, let me know what you think.

mrhdias commented 4 years ago

This fixes the "Bad file descriptor" error when running asynchttpserver behind an nginx instance. There might be some more serious underlying issue causing this, but for now I see it as Jester using asynchttpserver incorrectly which is fixed in this pr. Tested with both asynchttpserver and httpbeast.

Please, check the fix for this issue: https://github.com/nim-lang/Nim/pull/13394

zedeus commented 4 years ago

@mrhdias Not sure why you're replying to this pr, it has nothing to do with your changes