File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,14 @@ zend_class_entry* php_phongo_session_ce;
37
37
38
38
static bool php_phongo_topology_is_sharded_cluster (mongoc_client_t * client )
39
39
{
40
- mongoc_server_description_t * sd = mongoc_client_select_server (client , true, NULL , NULL );
40
+ mongoc_server_description_t * sd ;
41
+ bool ret ;
41
42
42
- return (sd && !strcmp (mongoc_server_description_type (sd ), php_phongo_server_description_type_map [PHONGO_SERVER_MONGOS ].name ));
43
+ sd = mongoc_client_select_server (client , true, NULL , NULL );
44
+ ret = (sd && !strcmp (mongoc_server_description_type (sd ), php_phongo_server_description_type_map [PHONGO_SERVER_MONGOS ].name ));
45
+ mongoc_server_description_destroy (sd );
46
+
47
+ return ret ;
43
48
}
44
49
45
50
static bool php_phongo_session_get_timestamp_parts (zval * obj , uint32_t * timestamp , uint32_t * increment TSRMLS_DC )
You can’t perform that action at this time.
0 commit comments