Skip to content

Commit 79869c5

Browse files
committed
test suite crashes if no server is running
1 parent 3f1a09b commit 79869c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test-libmongoc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,8 @@ call_ismaster_with_host_and_port (char *host, uint16_t port, bson_t *reply)
10001000

10011001
server_stream =
10021002
mongoc_cluster_stream_for_reads (&client->cluster, NULL, &error);
1003-
if (!mongoc_cluster_run_command_private (&client->cluster,
1003+
if (!server_stream ||
1004+
!mongoc_cluster_run_command_private (&client->cluster,
10041005
server_stream->stream,
10051006
0,
10061007
MONGOC_QUERY_SLAVE_OK,

0 commit comments

Comments
 (0)