lib/blather/client/client.rb in blather-0.5.10 vs lib/blather/client/client.rb in blather-0.5.11

- old
+ new

@@ -43,12 +43,12 @@ # @param [String] host if this isn't set it'll be resolved off the JID's # domain # @param [Fixnum, String] port the port to connect to. # # @return [Blather::Client] - def self.setup(jid, password, host = nil, port = nil, certs = nil) - self.new.setup(jid, password, host, port, certs) + def self.setup(jid, password, host = nil, port = nil, certs = nil, connect_timeout = nil) + self.new.setup(jid, password, host, port, certs, connect_timeout) end def initialize # @private @state = :initializing @@ -192,15 +192,16 @@ def setup? @setup.is_a? Array end # @private - def setup(jid, password, host = nil, port = nil, certs = nil) + def setup(jid, password, host = nil, port = nil, certs = nil, connect_timeout = nil) @jid = JID.new(jid) @setup = [@jid, password] - @setup << host if host - @setup << port if port - @setup << certs if certs + @setup << host + @setup << port + @setup << certs + @setup << connect_timeout self end protected