Open
Description
Since #153, it seems that task.stop
can no longer forcefully stop an HTTP server task.
In testing, consider something like this:
### async-http enabled app
server = Async::HTTP::Server.new(...)
server_task = Async{ server.run }
# make a request to the server's endpoint, which in turn talks to a remote origin
# that remote origin uses http1.1 with the default/implied Connection: keep-alive
server_task.stop
# this hangs until the keep-alive connection to origin finally times out, which could be awhile
In practice, this is causing lengthy timeouts in the test suite here (jumped from around 1 minute to over an hour). The delays are coming during requests to http1.1 origins. Reverting task.defer_stop
to begin
in Async::HTTP::Protocol::HTTP1::Server#each
resolves the issue. On the surface, the comparable change in ...HTTP2::Server
doesn't seem to be as much of a problem.
While at least part of it is in our tests, and could potentially be worked around, I'm also concerned about stuck tasks (even if due to other bugs) and that there won't be a way to kill them in a timely fashion apart from kill -9
.
Metadata
Metadata
Assignees
Labels
No labels