RUBY-436 Handle IRB::Abort Exception

This commit is contained in:
Tyler Brock 2012-04-23 16:58:11 -04:00
parent ecafeed637
commit b3a9d93096
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ module Mongo
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