Skip to content

Commit cb363d5

Browse files
authored
Merge pull request #786 from Unity-Technologies/unity-master-win32-socket-error
Fix Windows Socket.Send not blocking (case 984723)
2 parents acc623a + 26c4caf commit cb363d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mono/metadata/w32socket-win32.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ int mono_w32socket_send (SOCKET s, char *buf, int len, int flags, gboolean block
185185
{
186186
int ret = SOCKET_ERROR;
187187
MONO_ENTER_GC_SAFE;
188-
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, FALSE, ret, send, s, buf, len, flags);
188+
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, TRUE, ret, send, s, buf, len, flags);
189189
MONO_EXIT_GC_SAFE;
190190
return ret;
191191
}
@@ -194,7 +194,7 @@ int mono_w32socket_sendto (SOCKET s, const char *buf, int len, int flags, const
194194
{
195195
int ret = SOCKET_ERROR;
196196
MONO_ENTER_GC_SAFE;
197-
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, FALSE, ret, sendto, s, buf, len, flags, to, tolen);
197+
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, TRUE, ret, sendto, s, buf, len, flags, to, tolen);
198198
MONO_EXIT_GC_SAFE;
199199
return ret;
200200
}
@@ -203,7 +203,7 @@ int mono_w32socket_sendbuffers (SOCKET s, WSABUF *lpBuffers, guint32 dwBufferCou
203203
{
204204
int ret = SOCKET_ERROR;
205205
MONO_ENTER_GC_SAFE;
206-
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, FALSE, ret, WSASend, s, lpBuffers, dwBufferCount, lpNumberOfBytesRecvd, lpFlags, lpOverlapped, lpCompletionRoutine);
206+
ALERTABLE_SOCKET_CALL (FD_WRITE_BIT, blocking, TRUE, ret, WSASend, s, lpBuffers, dwBufferCount, lpNumberOfBytesRecvd, lpFlags, lpOverlapped, lpCompletionRoutine);
207207
MONO_EXIT_GC_SAFE;
208208
return ret;
209209
}

0 commit comments

Comments
 (0)