File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 5
5
#include "mongoc-tests.h"
6
6
#include "TestSuite.h"
7
7
#include "mock_server/mock-server.h"
8
+ #include "mongoc-errno-private.h"
8
9
9
10
#undef MONGOC_LOG_DOMAIN
10
11
#define MONGOC_LOG_DOMAIN "async-test"
@@ -59,6 +60,7 @@ test_ismaster_impl (bool with_ssl)
59
60
struct result results [NSERVERS ];
60
61
int r ;
61
62
int i ;
63
+ int errcode ;
62
64
bson_t q = BSON_INITIALIZER ;
63
65
64
66
#ifdef MONGOC_ENABLE_SSL
@@ -98,8 +100,10 @@ test_ismaster_impl (bool with_ssl)
98
100
sizeof (server_addr ),
99
101
0 );
100
102
101
- if (!(r == 0 || errno == EAGAIN || errno == EINPROGRESS )) {
102
- fprintf (stderr , "mongoc_socket_connect unexpected return: %d\n" , r );
103
+ errcode = mongoc_socket_errno (conn_sock );
104
+ if (!(r == 0 || MONGOC_ERRNO_IS_AGAIN (errcode ))) {
105
+ fprintf (stderr , "mongoc_socket_connect unexpected return: "
106
+ "%d (errno: %d)\n" , r , errcode );
103
107
fflush (stderr );
104
108
abort ();
105
109
}
You can’t perform that action at this time.
0 commit comments