Skip to content

Commit

Permalink
Merge pull request miyagawa#114 from timbunce/connection-reset-error
Browse files Browse the repository at this point in the history
Treat ECONNRESET like EPIPE (i.e. ignore), not as a fatal error.
  • Loading branch information
miyagawa committed Jun 3, 2015
2 parents 1392471 + 261cfb9 commit 9bcb99c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Starman/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use IO::Socket qw(:crlf);
use HTTP::Parser::XS qw(parse_http_request);
use HTTP::Status qw(status_message);
use HTTP::Date qw(time2str);
use POSIX qw(EINTR EPIPE);
use POSIX qw(EINTR EPIPE ECONNRESET);
use Symbol;

use Plack::Util;
Expand Down Expand Up @@ -567,6 +567,7 @@ sub _syswrite {

if (not defined $len) {
return if $! == EPIPE;
return if $! == ECONNRESET;
redo if $! == EINTR;
die "write error: $!";
}
Expand Down

0 comments on commit 9bcb99c

Please sign in to comment.