Sha256: 8bfe6efb31391da4d934dc1eabcf8f97b743a4bb86c8200f01ec76aa98cefa4d
Contents?: true
Size: 684 Bytes
Versions: 74
Compression:
Stored size: 684 Bytes
Contents
class TCPSocket def self.wait_for_service_with_timeout(options) start_time = Time.now until listening_service?(options) verbose_wait if options[:timeout] && (Time.now > start_time + options[:timeout]) raise SocketError.new("Socket did not open within #{options[:timeout]} seconds") end end end def self.wait_for_service_termination_with_timeout(options) start_time = Time.now while listening_service?(options) verbose_wait if options[:timeout] && (Time.now > start_time + options[:timeout]) raise SocketError.new("Socket did not terminate within #{options[:timeout]} seconds") end end end end
Version data entries
74 entries across 74 versions & 30 rubygems