RUBY-436 Handle IRB::Abort Exception

This commit is contained in:
Tyler Brock 2012-04-26 13:53:21 -04:00
parent 7384585d98
commit d176c2a0f3
1 changed files with 6 additions and 1 deletions

View File

@ -137,9 +137,14 @@ module Mongo
send_message_on_socket(packed_message, sock)
result = receive(sock, request_id, exhaust)
rescue SystemStackError, NoMemoryError, SystemCallError, IRB::Abort => ex
rescue SystemStackError, NoMemoryError, SystemCallError => ex
close
raise ex
rescue Exception => ex
if defined?(IRB)
close if ex.class == IRB::Abort
end
raise ex
ensure
if should_checkin
if command || read == :primary