mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_connect): return value was broken when some
error occurred. [ruby-core:24234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9997227af8
commit
fe038100d9
2 changed files with 10 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Aug 3 16:28:09 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_connect): return value was broken when some
|
||||||
|
error occurred.
|
||||||
|
[ruby-core:24234]
|
||||||
|
|
||||||
Mon Aug 3 15:56:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Aug 3 15:56:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (permute0): use chars for boolean array.
|
* array.c (permute0): use chars for boolean array.
|
||||||
|
|
|
@ -2591,14 +2591,11 @@ rb_w32_connect(int s, const struct sockaddr *addr, int addrlen)
|
||||||
RUBY_CRITICAL({
|
RUBY_CRITICAL({
|
||||||
r = connect(TO_SOCKET(s), addr, addrlen);
|
r = connect(TO_SOCKET(s), addr, addrlen);
|
||||||
if (r == SOCKET_ERROR) {
|
if (r == SOCKET_ERROR) {
|
||||||
r = WSAGetLastError();
|
int err = WSAGetLastError();
|
||||||
if (r != WSAEWOULDBLOCK) {
|
if (err != WSAEWOULDBLOCK)
|
||||||
errno = map_errno(r);
|
errno = map_errno(err);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
errno = EINPROGRESS;
|
errno = EINPROGRESS;
|
||||||
r = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in a new issue