diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/webrick/utils.rb | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sat Jun 28 15:32:57 2014 Tanaka Akira <akr@fsij.org> + + * lib/webrick/utils.rb (create_listeners): Close socket objects. + Sat Jun 28 13:58:48 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c (setup_exception): should not overwrite SystemStackError diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 4f43a5f1f8..f3290ce53e 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -70,7 +70,9 @@ module WEBrick sockets = Socket.tcp_server_sockets(address, port) sockets = sockets.map {|s| s.autoclose = false - TCPServer.for_fd(s.fileno) + ts = TCPServer.for_fd(s.fileno) + s.close + ts } return sockets end |