minor: close connection before exception

This commit is contained in:
Kyle Banker 2010-07-15 14:13:40 -04:00
parent a5c40907d5
commit b1cf0d1e13
1 changed files with 1 additions and 1 deletions

View File

@ -71,8 +71,8 @@ module Mongo
# pair but it has died or something like that) then we close that
# connection. The next request will re-open on master server.
if err == "not master"
raise ConnectionFailure, err
@connection.close
raise ConnectionFailure, err
end
raise OperationFailure, err