* win32/win32.c (finish_overlapped_socket): return value of this

function should be only 0 or SOCKET_ERROR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2015-11-19 05:16:13 +00:00
parent 3e8672094d
commit 2e865ba81e
2 changed files with 8 additions and 1 deletions

View file

@ -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;
}