-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(net): set timeouts directly in
accept
Currently, timeouts are set in `Worker::handle_connection`, _after_ the stream has been returned by `Listener::accept`. This is not quite right, as a `Listener` implementation that wraps `HttpListener` might do I/O in its own `accept` implementation. For that I/O, no timeouts have been set yet. This is not a purely theoretical concern either, as `HttpsListener` can do this, depending on the implementation of `SslServer` it uses. I suspect, but could not yet confirm, that this behavior is responsible for issue #950. As of this commit, the timeouts are set by `HttpListener`, directly after the connection has been accepted. Please note that `Worker` also still sets the timeouts. This redundancy will be cleaned up in the following commits.
- Loading branch information
1 parent
2cc9e7c
commit f5d4d65
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters