diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/server.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index f1f0d81fdf..8b53939c52 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -131,7 +131,6 @@ module WEBrick def listen(address, port) @listeners += Utils::create_listeners(address, port) - setup_shutdown_pipe end ## @@ -159,6 +158,8 @@ module WEBrick raise ServerError, "already started." if @status != :Stop server_type = @config[:ServerType] || SimpleServer + setup_shutdown_pipe + server_type.start{ @logger.info \ "#{self.class}#start: pid=#{$$} port=#{@config[:Port]}" @@ -330,6 +331,7 @@ module WEBrick def cleanup_shutdown_pipe(shutdown_pipe) @shutdown_pipe = nil + return if !shutdown_pipe shutdown_pipe.each {|io| if !io.closed? begin |