mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/socket.c (ruby_connect): break immediately if a
socket is non-blocking. [ruby-talk:111654] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
38d5918439
commit
9c4553e9f8
2 changed files with 10 additions and 0 deletions
|
@ -5193,6 +5193,11 @@ Wed Sep 8 15:19:49 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
|||
|
||||
* ext/tk/lib/tk/text.rb: add TkText#clear and erase
|
||||
|
||||
Tue Sep 7 15:17:49 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/socket/socket.c (ruby_connect): break immediately if a
|
||||
socket is non-blocking. [ruby-talk:111654]
|
||||
|
||||
Mon Sep 6 11:08:50 2004 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* ext/tk/lib/tk/menu.rb(TkOptionMenubutton#insert): call correct method
|
||||
|
|
|
@ -929,7 +929,9 @@ ruby_connect(fd, sockaddr, len, socks)
|
|||
int socks;
|
||||
{
|
||||
int status;
|
||||
#if defined(HAVE_FCNTL)
|
||||
int mode;
|
||||
#endif
|
||||
#if WAIT_IN_PROGRESS > 0
|
||||
int wait_in_progress = -1;
|
||||
int sockerr, sockerrlen;
|
||||
|
@ -973,6 +975,9 @@ ruby_connect(fd, sockaddr, len, socks)
|
|||
#ifdef EINPROGRESS
|
||||
case EINPROGRESS:
|
||||
#endif
|
||||
#if defined(HAVE_FCNTL)
|
||||
if (mode & NONBLOCKING) break;
|
||||
#endif
|
||||
#if WAIT_IN_PROGRESS > 0
|
||||
sockerrlen = sizeof(sockerr);
|
||||
status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue