Sha256: 1307fcdf4b726c3774419a78020c0bc3eaff28ed877e3968c25bf4cd3ad6d7d5
Contents?: true
Size: 709 Bytes
Versions: 3
Compression:
Stored size: 709 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
3 entries across 3 versions & 2 rubygems