diff --git a/ChangeLog b/ChangeLog index 3bbc89f579..617c26530c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 19 14:14:37 2015 NAKAMURA Usaku + + * win32/win32.c (finish_overlapped_socket): return value of this + function should be only 0 or SOCKET_ERROR. + Thu Nov 19 14:12:12 2015 Nobuyoshi Nakada * compile.c (iseq_tailcall_optimize): apply tail call optimization diff --git a/win32/win32.c b/win32/win32.c index 6ebd9e433c..d6ffec6075 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3269,15 +3269,17 @@ finish_overlapped_socket(BOOL input, SOCKET s, WSAOVERLAPPED *wol, int result, D result = WSAGetOverlappedResult(s, wol, &size, TRUE, &flg) ); if (result) { + result = 0; *len = size; break; } + result = SOCKET_ERROR; /* thru */ default: if ((err = WSAGetLastError()) == WSAECONNABORTED && !input) errno = EPIPE; else if (err == WSAEMSGSIZE && input) { - result = TRUE; + result = 0; *len = size; break; }