close connection when safe mode insert results in 'not master'
This commit is contained in:
parent
424f08af5e
commit
2939932526
|
@ -424,7 +424,7 @@ module Mongo
|
||||||
checkin(sock)
|
checkin(sock)
|
||||||
end
|
end
|
||||||
if num_received == 1 && (error = docs[0]['err'] || docs[0]['errmsg'])
|
if num_received == 1 && (error = docs[0]['err'] || docs[0]['errmsg'])
|
||||||
close
|
close if error == "not master"
|
||||||
raise Mongo::OperationFailure, error
|
raise Mongo::OperationFailure, error
|
||||||
end
|
end
|
||||||
[docs, num_received, cursor_id]
|
[docs, num_received, cursor_id]
|
||||||
|
|
Loading…
Reference in New Issue