1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

webrick: avoid needless wakeup from IO.select

Since r51231 ("webrick/server.rb: stop immediately"),
there is no need to poll on the @status change every
two seconds.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2017-10-09 19:00:22 +00:00
parent 310e91f505
commit 4c6335e93b

View file

@ -167,7 +167,7 @@ module WEBrick
while @status == :Running
begin
sp = shutdown_pipe[0]
if svrs = IO.select([sp, *@listeners], nil, nil, 2.0)
if svrs = IO.select([sp, *@listeners])
if svrs[0].include? sp
# swallow shutdown pipe
buf = String.new