From a5b5d5e3e3c09c30c772edb61f177041c5df618c Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Wed, 4 Apr 2012 20:36:42 -0400 Subject: [PATCH] RUBY-429 tweaks to rescued errors --- lib/mongo/util/tcp_socket.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mongo/util/tcp_socket.rb b/lib/mongo/util/tcp_socket.rb index bfbb281..1b9c465 100644 --- a/lib/mongo/util/tcp_socket.rb +++ b/lib/mongo/util/tcp_socket.rb @@ -65,9 +65,9 @@ module Mongo @socket.readpartial(maxlen, buffer) rescue EOFError return ConnectionError - rescue Errno::ECONNRESET, Errno::ENOTCONN, Errno::EBADF + rescue Errno::ENOTCONN, Errno::EBADF, Errno::ECONNRESET, Errno::EPIPE raise ConnectionFailure - rescue Errno::EINTR, Errno::EIO, Errno::EPIPE + rescue Errno::EINTR, Errno::EIO raise OperationFailure end else