Skip to content

Commit

Permalink
minor: close connection before exception
Browse files Browse the repository at this point in the history
  • Loading branch information
banker committed Jul 15, 2010
1 parent a5c4090 commit b1cf0d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo/cursor.rb
Expand Up @@ -71,8 +71,8 @@ def next_document
# 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
Expand Down

0 comments on commit b1cf0d1

Please sign in to comment.