lib/bunny/session.rb in bunny-1.4.0 vs lib/bunny/session.rb in bunny-1.4.1

- old
+ new

@@ -256,11 +256,11 @@ self.open_connection @reader_loop = nil self.start_reader_loop if threaded? - @default_channel = self.create_channel + @default_channel = self.create_channel unless @default_channel rescue Exception => e @status_mutex.synchronize { @status = :not_connected } raise e end @@ -661,13 +661,10 @@ end end # @private def recover_channels - # default channel is reopened right after connection - # negotiation is completed, so make sure we do not try to open - # it twice. MK. - @channels.reject { |n, ch| ch == @default_channel }.each do |n, ch| + @channels.each do |n, ch| ch.open ch.recover_from_network_failure end end