You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We probably should allow injecting the server socket instead of forcing it to be build by HTTP::Server itself. Then the tests can just inject a fake backed by MemoryIO or similar. That would also partly address #2735
There's another issue: when the IO is closed the server tries to response with an error, many times, but the IO is closed. This ends up bubbling an exception to main.
The problem is in these lines:
crystal/src/http/server.cr
Lines 171 to 176 in fd9bd6f
On the
rescue
branchrequest
must be set tonil
, otherwise on an exception it will keep the value of the previous iteration, which is wrong.The fix is easy, but I'd like to add a spec to prevent regressions... but I don't know how to easily do it.
Originally discovered by @mverzilli and @waj
The text was updated successfully, but these errors were encountered: