diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-08 01:17:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-08 01:17:07 +0000 |
commit | 719804b5df99feb8f8b871051d64bdd73524511f (patch) | |
tree | d3629fdb8fcf5ba8040fdfcf125d5b5ad42da496 /lib/webrick/server.rb | |
parent | b9f770ae8ffe2c5f83b5f411534c6d5c2f687345 (diff) | |
download | ruby-719804b5df99feb8f8b871051d64bdd73524511f.tar.gz |
webrick/httpserver.rb: Stop handling requests on shutdown
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): stop
handling requests on shutdown, even if the socket is readable
and IO.select() returns true. [Fixes GH-607]
* lib/webrick/server.rb (WEBrick::GenericServer#start): IO.select()
raises ENOTSOCK on shutdown on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r-- | lib/webrick/server.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index 3f5371ba47..bd8a045891 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -180,7 +180,7 @@ module WEBrick end } end - rescue Errno::EBADF, IOError => ex + rescue Errno::EBADF, Errno::ENOTSOCK, IOError => ex # if the listening socket was closed in GenericServer#shutdown, # IO::select raise it. rescue StandardError => ex |