In mail "[ruby-talk:17712] Re: Net/Http problem - connect(2) error on windows"
    Michael Witrant <mike / lepton.fr> wrote:

> On Thu, 12 Jul 2001 18:52:17 +0900
> "Ross Shaw" <RossShaw / mac.com> wrote:

> > > > /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:507:in `new':
> Invalid
> > > > argument - "connect(2)"(Errno::EINVAL)
> > >
> > > It is the known bug of ruby socket.
> > > Try ruby 1.6.4 or stable snapshot.

> > Unfortunately 1.6.4 does not fix this problem.

Ahh, sorry. I was wrong.
As Sean said, This bug is fixed in only developping version (1.7).


> Is the bug described somewhere? I plan to use ruby sockets on win32 very
> often (mostly druby). When can I expect this bug to happend?

For example ruby-bug PR#142, [ruby-talk:16630, 16632] and more on
ruby-dev & ruby-list. To summarize, it depends on cygwin and happens
in high rate when using TCPSocket. mswin/mingw version seams ok.

To avoid this bug temporarily, rescue Errno::EINVAL & sleep(0.2) & retry.

Minero Aoki