diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-19 04:59:50 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-19 04:59:50 +0000 |
commit | ebcd21dcf0e324511ea724c475c04b39ca3e518b (patch) | |
tree | b9fa7bb9b8e81cd20171eb54fe01d5319e2731d7 | |
parent | 77557e23326cf497b57497ab1a0db4266af89636 (diff) | |
download | ruby-ebcd21dcf0e324511ea724c475c04b39ca3e518b.tar.gz |
* win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,
because POSIX platforms just do so. fixes test errors revealed by
r52647.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win32/win32.c | 7 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Nov 19 13:57:58 2015 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input, + because POSIX platforms just do so. fixes test errors revealed by + r52647. + Thu Nov 19 02:52:30 2015 NAKAMURA Usaku <usa@ruby-lang.org> * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size diff --git a/win32/win32.c b/win32/win32.c index 953c916c93..6ebd9e433c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3276,8 +3276,13 @@ finish_overlapped_socket(BOOL input, SOCKET s, WSAOVERLAPPED *wol, int result, D default: if ((err = WSAGetLastError()) == WSAECONNABORTED && !input) errno = EPIPE; + else if (err == WSAEMSGSIZE && input) { + result = TRUE; + *len = size; + break; + } else - errno = map_errno(WSAGetLastError()); + errno = map_errno(err); /* thru */ case WAIT_OBJECT_0 + 1: /* interrupted */ |