summaryrefslogtreecommitdiff
path: root/lib/chef/monkey_patches/webrick-utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/monkey_patches/webrick-utils.rb')
-rw-r--r--lib/chef/monkey_patches/webrick-utils.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/monkey_patches/webrick-utils.rb b/lib/chef/monkey_patches/webrick-utils.rb
index fa52a753c4..6e3748f308 100644
--- a/lib/chef/monkey_patches/webrick-utils.rb
+++ b/lib/chef/monkey_patches/webrick-utils.rb
@@ -33,16 +33,16 @@ module WEBrick
last_error = nil
sockets = []
res.each do |ai|
- begin
- logger.debug("TCPServer.new(#{ai[3]}, #{port})") if logger
- sock = TCPServer.new(ai[3], port)
- port = sock.addr[1] if port == 0
- Utils.set_close_on_exec(sock)
- sockets << sock
- rescue => ex
- logger.warn("TCPServer Error: #{ex}") if logger
- last_error = ex
- end
+
+ logger.debug("TCPServer.new(#{ai[3]}, #{port})") if logger
+ sock = TCPServer.new(ai[3], port)
+ port = sock.addr[1] if port == 0
+ Utils.set_close_on_exec(sock)
+ sockets << sock
+ rescue => ex
+ logger.warn("TCPServer Error: #{ex}") if logger
+ last_error = ex
+
end
raise last_error if sockets.empty?