Skip to content

Commit

Permalink
Catch ECONNRESET error codes from other platforms
Browse files Browse the repository at this point in the history
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 #763 #547
  • Loading branch information
ashleysommer authored and quinnj committed Sep 22, 2021
1 parent 81ac504 commit c7dff29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Servers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ function listenloop(f, server, tcpisvalid, connection_count,
handle_connection(f, conn, server, reuse_limit, readtimeout)
# verbose && @info "Closed ($count): $conn"
catch e
if e isa Base.IOError && (e.code == -54 || e.code == -4077)
if e isa Base.IOError &&
(e.code == -54 || e.code == -4077 || e.code == -104 || e.code == -131 || e.code == -232)
verbose && @warn "connection reset by peer (ECONNRESET)"
else
@error "" exception=(e, stacktrace(catch_backtrace()))
Expand Down

0 comments on commit c7dff29

Please sign in to comment.