lib/frankenstein/server.rb in frankenstein-0.2.0 vs lib/frankenstein/server.rb in frankenstein-0.2.0.4.g676c8dd
- old
+ new
@@ -80,19 +80,23 @@
begin
wrapped_logger = Frankenstein::Server::WEBrickLogger.new(logger: @logger)
@server = WEBrick::HTTPServer.new(Logger: wrapped_logger, BindAddress: nil, Port: @port, AccessLog: [[wrapped_logger, WEBrick::AccessLog::COMMON_LOG_FORMAT]])
@server.mount "/", Rack::Handler::WEBrick, app
rescue => ex
+ #:nocov:
@logger.fatal("Frankenstein::Server#run") { (["Exception while trying to create WEBrick::HTTPServer: #{ex.message} (#{ex.class})"] + ex.backtrace).join("\n ") }
+ #:nocov:
ensure
@op_cv.signal
end
end
begin
@server.start if @server
rescue => ex
+ #:nocov:
@logger.fatal("Frankenstein::Server#run") { (["Exception while running WEBrick::HTTPServer: #{ex.message} (#{ex.class})"] + ex.backtrace).join("\n ") }
+ #:nocov:
end
end
end
@op_mutex.synchronize { @op_cv.wait(@op_mutex) until @server }