diff --git a/README.pod b/README.pod index de7999f..ff17bfb 100644 --- a/README.pod +++ b/README.pod @@ -1619,6 +1619,10 @@ Ivan Kruglov Steffen Mueller +=item * + +David Millar + =back =head1 AUTHORS diff --git a/lib/Redis.pm b/lib/Redis.pm index 62bcb21..8c51293 100644 --- a/lib/Redis.pm +++ b/lib/Redis.pm @@ -28,6 +28,7 @@ use constant EWOULDBLOCK => eval {Errno::EWOULDBLOCK} || -1E9; use constant EAGAIN => eval {Errno::EAGAIN} || -1E9; use constant EINTR => eval {Errno::EINTR} || -1E9; use constant ECONNRESET => eval {Errno::ECONNRESET} || -1E9; +use constant EPIPE => eval {Errno::EPIPE} || -1E9; # According to IO::Socket::SSL documentation, 16k is the maximum # size of an SSL frame and because sysread returns data from only @@ -1038,6 +1039,9 @@ sub __try_read_sock { ## or because an intermediate proxy shut down our connection using its internal timeout counter return 0 if ($err && $err == ECONNRESET); + ## Broken pipe, we will need to reconnect + $self->__throw_reconnect('Broken pipe') if $err == EPIPE; + ## result is undef but err is 0? should never happen return if $err == 0;