lib/client/utils.rb in stomp-1.2.5 vs lib/client/utils.rb in stomp-1.2.6
- old
+ new
@@ -54,11 +54,10 @@
hosts
end
# A very basic check of required arguments.
- # *NOTE* This method will be made private in the next release.
def check_arguments!()
raise ArgumentError if @host.nil? || @host.empty?
raise ArgumentError if @port.nil? || @port == '' || @port < 1 || @port > 65535
raise ArgumentError unless @reliable.is_a?(TrueClass) || @reliable.is_a?(FalseClass)
end
@@ -70,12 +69,11 @@
new_options[:max_reconnect_delay] = (options["maxReconnectDelay"] || 30000 ).to_f / 1000 # In ms
new_options[:use_exponential_back_off] = !(options["useExponentialBackOff"] == "false") # Default: true
new_options[:back_off_multiplier] = (options["backOffMultiplier"] || 2 ).to_i
new_options[:max_reconnect_attempts] = (options["maxReconnectAttempts"] || 0 ).to_i
new_options[:randomize] = options["randomize"] == "true" # Default: false
- new_options[:backup] = false # Not implemented yet: I'm using a master X slave solution
- new_options[:timeout] = -1 # Not implemented yet: a "timeout(5) do ... end" would do the trick, feel free
+ new_options[:connect_timeout] = 0
new_options
end
# find_listener returns the listener for a given subscription in a given message.
@@ -106,11 +104,13 @@
elsif message.command == Stomp::CMD_RECEIPT
if listener = @receipt_listeners[message.headers['receipt-id']]
listener.call(message)
end
end
- end
+ end # while true
end
- end
- end
-end
+ end # method start_listeners
+
+ end # class Client
+
+end # module Stomp