-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 10: Connection error: I/O error: An established connection was aborted by the software in your host machine. #25
Comments
Well, it's not the problem with My real-life code for handling accept is along the lines of:
Probably you can also do whatever hyper does for listening, i.e. (I might have to update the example...) |
Okay, so this piece of code seems to be quite large and useful not only for HTTP. I'm thinking to either put it into |
@tailhook shouldn't that kind of logic be in tokio proto? |
Well, we don't use tokio-proto for protocol parsing for multiple reasons. So depending on it just for |
I see, sorry! I'm not yet familiar with the tokio ecosystem :) |
Wow! While refactoring this example to a separate library I've found out that this code is a little bit wrong. When listening there are few errors that require sleep and repeat (namely ENFILE and EMFILE), but there are also few errors that should not incur delay (namely ECONNREFUSED), because this means some bad-behaving user might use it to block other connections. I'll do my best to publish correct code ASAP. |
So, I've published tk-listen crate. Probably, I'll update examples here to use the crate. |
Good stuff! I do hope that the larger Tokio community picks up on your crate, or maybe even integrates it into some other crate. |
I am testing out using tk-http instead of Hyper, and I noticed I can quite easily get my code to crash with some low-level looking network error by holding down the F5 key in Firefox. I haven't been able to trigger an error like this with Hyper.
I'm running this code on Windows 10 with the MSVC toolchain.
To reproduce, checkout this revision of my
pandt
project. Then do the following in the checkout:Then load up http://localhost:1337/ in your browser and spam it until it crashes, which only takes a few seconds for me.
Here's a link to quickly see my mainloop: arpeggiorpg/arpeggiorpg@254dbed#diff-23e1c8400fe6268f1a67705b9c60cde2R84
The text was updated successfully, but these errors were encountered: