-
Notifications
You must be signed in to change notification settings - Fork 180
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
Server emitting errors and traceback on ECONNRESET when it should be a warning. #763
Comments
This comment on #547 also mentions their code is |
I just performed a local build of this library, with the |
Ok, I'm now pretty sure the code From what I can tell by looking at code overlaps, it should be pretty safe to just naively write |
Windows uses -4077 SPAC and ALPHA on linux use -54 Generic on linux uses -104 PARSIC on linux uses -232 MIPS on linux uses -131 I'm guessing MacOS uses -54 too, as this was one code that already worked for a large group of people. Fixes JuliaWeb#763 JuliaWeb#547
Using versions:
Julia 1.6
HTTP.jl 0.9.14
It appears the intention of this code in Servers.jl is to throw a warning rather than an error when the connection is reset by the peer (ie, client closed the connection to our server).
However this is done by a check on the error code. And this code seems to change based on the architecture of the system running. On my system, ECONNRESET corresponds with e.code of
-104
.See this list of search results for "connection reset by peer" in the linux source code:
https://github.com/torvalds/linux/search?p=1&q=%22connection+reset+by+peer%22&type=code
Notice lots of different
errno.h
files.54
(as per the code in Julia)104
(this is what my system is, and probably 99% of users)232
131
Note, when the TCP driver throws these exceptions, it makes them negative, so Julia must match on the negative value, eg
-104
.I don't know why
-4077
is in the code, it doesn't match any error number I could find, maybe thats the one windows uses?Related to #547
Tangentially related to #657 (in the sense that an error is propagated in a non-actionable way)
The text was updated successfully, but these errors were encountered: