Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

PHP-1468 fix segfault on ismaster failure #875

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions mcon/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,9 @@ static mongo_connection *mongo_get_connection_multiple(mongo_con_manager *manage
/* If it failed because of wire version, we have to bail out completely
* later on, but we should continue to aggregate the errors in case more
* servers are unsupported */
mongo_manager_connection_deregister(manager, tmp);
if (ismaster_error == 4) {
mongo_manager_connection_deregister(manager, tmp);
found_supported_wire_version = 0;
} else {
mongo_connection_destroy(manager, tmp, MONGO_CLOSE_BROKEN);
}
tmp = NULL;
found_connected_server--;
Expand Down