lib/socketry/tcp/server.rb in socketry-0.3.0 vs lib/socketry/tcp/server.rb in socketry-0.4.0
- old
+ new
@@ -41,9 +41,11 @@
else
@server = server_class.new(hostname_or_port)
end
start_timer(timer)
+ rescue Errno::EADDRINUSE => ex
+ raise AddressInUseError, ex.message, ex.backtrace
end
# Accept a connection to the server
#
# @param timeout [Numeric, NilClass] seconds to wait before aborting the accept