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

Commit 3577b76

Browse files
mattklein123jmikola
authored andcommitted
PHPC-1468: Fix segfault on isMaster failure
1 parent d320fd7 commit 3577b76

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mcon/manager.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,9 @@ static mongo_connection *mongo_get_connection_multiple(mongo_con_manager *manage
429429
* later on, but we should continue to aggregate the errors in case more
430430
* servers are unsupported */
431431
if (ismaster_error == 4) {
432-
mongo_manager_connection_deregister(manager, tmp);
433432
found_supported_wire_version = 0;
434-
} else {
435-
mongo_connection_destroy(manager, tmp, MONGO_CLOSE_BROKEN);
436433
}
434+
mongo_manager_connection_deregister(manager, tmp);
437435
tmp = NULL;
438436
found_connected_server--;
439437
}

0 commit comments

Comments
 (0)