Skip to content

Commit 5da9035

Browse files
committed
CDRIVER-756: Use correct failure value, and assign errno when WSAPoll fails
1 parent 14e7de8 commit 5da9035

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mongoc/mongoc-socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ _mongoc_socket_wait (int sd, /* IN */
146146
#ifdef _WIN32
147147
ret = WSAPoll (&pfd, 1, timeout);
148148
if (ret == SOCKET_ERROR) {
149-
MONGOC_WARNING ("WSAGetLastError(): %d", WSAGetLastError ());
150-
ret = false;
149+
errno = WSAGetLastError();
150+
ret = -1;
151151
}
152152
#else
153153
ret = poll (&pfd, 1, timeout);

0 commit comments

Comments
 (0)