Greg.mpls / gmail.com wrote:
> diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
> index 2d678273e5..57ffe5a48b 100644
> --- a/lib/webrick/server.rb
> +++ b/lib/webrick/server.rb
> @@ -295,12 +295,14 @@ def start_thread(sock, &block)
>            end
>            if sock.respond_to?(:sync_close=) && @config[:SSLStartImmediately]
>              WEBrick::Utils.timeout(@config[:RequestTimeout]) do
> -
> -              # we must call OpenSSL::SSL::SSLSocket#accept_nonblock until
> -              # it stop returning wait_* symbols:
> +              
> +              # we must call OpenSSL::SSL::SSLSocket#accept_nonblock until it
> +              # stops returning wait_* symbols
> +              # accept_nonblock can only be called once on Windows

That is bizarre and this is not the right place for
platform-specific code.  There's bound to be other places where
SSLSocket#accept_nonblock is used like this...

Also, does test/openssl/test_pair.rb work for you?  Does it
still work when the IO.select calls in test_connect_accept_nonblock_no_exception
are replaced with corresponding IO#wait_*able calls?

(I guess it's desirable to minimize dependencies in those tests,
 which is why IO.select is used instead of IO#wait_*able.

Thanks.

>                case ret = sock.accept_nonblock(exception: false)
>                when :wait_readable, :wait_writable
>                  sock.to_io.__send__(ret)
> +                break if /mingw|mswin/ =~ RUBY_PLATFORM
>                else
>                  break
>                end while true

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>