Project

General

Profile

Bug #14013 ยป webrick.patch

MSP-Greg (Greg L), 10/17/2017 03:48 PM

View differences:

lib/webrick/server.rb
295 295
          end
296 296
          if sock.respond_to?(:sync_close=) && @config[:SSLStartImmediately]
297 297
            WEBrick::Utils.timeout(@config[:RequestTimeout]) do
298

  
299
              # we must call OpenSSL::SSL::SSLSocket#accept_nonblock until
300
              # it stop returning wait_* symbols:
298
              
299
              # we must call OpenSSL::SSL::SSLSocket#accept_nonblock until it
300
              # stops returning wait_* symbols
301
              # accept_nonblock can only be called once on Windows
301 302
              case ret = sock.accept_nonblock(exception: false)
302 303
              when :wait_readable, :wait_writable
303 304
                sock.to_io.__send__(ret)
305
                break if /mingw|mswin/ =~ RUBY_PLATFORM
304 306
              else
305 307
                break
306 308
              end while true