-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.0
-
Component/s: None
-
None
disconnect! is necessary on a Mongo::SocketError, otherwise we'll repeat using a bad connection. The following patch illustrates this.
class Connection
def dispatch(messages)
begin
write(messages)
messages.last.replyable? ? read : nil
rescue Mongo::SocketError => e
disconnect!
raise e
end
end
end
Refactoring to avoid rescue/raise would be nice.