lib/bunny/session.rb in bunny-0.9.0.rc2 vs lib/bunny/session.rb in bunny-0.9.0
- old
+ new
@@ -38,10 +38,17 @@
# backwards compatibility
# @private
CONNECT_TIMEOUT = Transport::DEFAULT_CONNECTION_TIMEOUT
+ # @private
+ DEFAULT_CONTINUATION_TIMEOUT = if RUBY_VERSION.to_f < 1.9
+ 8000
+ else
+ 4000
+ end
+
# RabbitMQ client metadata
DEFAULT_CLIENT_PROPERTIES = {
:capabilities => {
:publisher_confirms => true,
:consumer_cancel_notify => true,
@@ -122,10 +129,10 @@
else
opts[:automatically_recover] || opts[:automatic_recovery]
end
@network_recovery_interval = opts.fetch(:network_recovery_interval, DEFAULT_NETWORK_RECOVERY_INTERVAL)
# in ms
- @continuation_timeout = opts.fetch(:continuation_timeout, 4000)
+ @continuation_timeout = opts.fetch(:continuation_timeout, DEFAULT_CONTINUATION_TIMEOUT)
@status = :not_connected
# these are negotiated with the broker during the connection tuning phase
@client_frame_max = opts.fetch(:frame_max, DEFAULT_FRAME_MAX)