From: "J.Herre" Date: 2003-05-17T02:40:04+09:00 Subject: Re: ping.rb On Friday, May 16, 2003, at 09:33 AM, J.Herre wrote: > On Thursday, May 15, 2003, at 08:05 PM, nobu.nokada@softhome.net wrote: > >> Seems to always wait one second once EINPROGRESS is returned. >> > > I think that OSX and cygwin are separate cases. Maybe delay could be > reduced for OSX? No need to wait so long. No I'm wrong. I was confused. Your patch works like charm. > >> Boolean may be enough as wait_in_progress if getsockopt() will >> return proper status. >> > > Yes. I think so. For OSX anyway. I will test to see if timeout is > caught this way. > FWIW. As you say, boolean seems to work just fine in every case i tried. No idea about cygwin though. ------------------------------------------------------ Jamie Herre Gettys Group Software, Inc. Index: ext/socket/socket.c =================================================================== RCS file: /src/ruby/ext/socket/socket.c,v retrieving revision 1.93 diff -U2 -r1.93 socket.c --- ext/socket/socket.c 16 May 2003 15:18:14 -0000 1.93 +++ ext/socket/socket.c 16 May 2003 17:36:26 -0000 @@ -790,5 +790,5 @@ #ifdef WAIT_IN_PROGRESS case EINVAL: - if (wait_in_progress-- > 0) { + if (wait_in_progress == WAIT_IN_PROGRESS) { int sockerr, sockerrlen = sizeof(sockerr);