Skip to content

Commit

Permalink
Merge pull request mono/mono#4013 from ntherning/fix-assert-in-poll_e…
Browse files Browse the repository at this point in the history
…vent_wait-on-WSAENOTSOCK-on-windows-2

Fix assert in poll_event_wait() on WSAENOTSOCK on Windows mono/mono#2

Commit migrated from mono/mono@63caa19
  • Loading branch information
ntherning committed Nov 23, 2016
2 parents 040b651 + c8b99b0 commit 79085c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mono/mono/metadata/socket-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ ves_icall_System_Net_Sockets_Socket_Poll_internal (SOCKET sock, gint mode,

if (ret == -1) {
#ifdef HOST_WIN32
*werror = errno > 0 && errno < WSABASEERR ? errno + WSABASEERR : errno;
*werror = (errno > 0 && errno < WSABASEERR) ? errno + WSABASEERR : errno;
#else
*werror = errno_to_WSA (errno, __func__);
#endif
Expand Down Expand Up @@ -1868,7 +1868,7 @@ ves_icall_System_Net_Sockets_Socket_Select_internal (MonoArray **sockets, gint32

if (ret == -1) {
#ifdef HOST_WIN32
*werror = errno > 0 && errno < WSABASEERR ? errno + WSABASEERR : errno;
*werror = (errno > 0 && errno < WSABASEERR) ? errno + WSABASEERR : errno;
#else
*werror = errno_to_WSA (errno, __func__);
#endif
Expand Down

0 comments on commit 79085c1

Please sign in to comment.