[#1094] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — Dave Thomas <dave@...>

> * eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;

12 messages 2003/05/29
[#1095] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — nobu.nokada@... 2003/05/29

Hi,

Re: ping.rb

From: "J.Herre" <jlst@...>
Date: 2003-05-16 17:40:04 UTC
List: ruby-core #1064
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);



In This Thread

Prev Next