From 251b595ad5d65e575f6ce7bcfbd1d1a5c5357460 Mon Sep 17 00:00:00 2001 From: Ashley Sommer Date: Wed, 22 Sep 2021 09:08:01 +1000 Subject: [PATCH] Catch ECONNRESET error codes from other platforms 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 --- src/Servers.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Servers.jl b/src/Servers.jl index 11ee7bf4e..db2c71843 100644 --- a/src/Servers.jl +++ b/src/Servers.jl @@ -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()))