bunny 1.5.0.pre1 → 1.5.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2e3f4cbc8cb08e8cebce0b4ae4b87056744fcf4
4
- data.tar.gz: 17d65911fb9a606ea5d5f7b9af0f21dd811266bf
3
+ metadata.gz: 1c15c502df9001bb1ec063fa41f0e61c881ac80f
4
+ data.tar.gz: 57080f28afb4b25b20a197b2c18138c5babeb01e
5
5
  SHA512:
6
- metadata.gz: d16bfeab544fb842e3030bf1aa6fd7e7ed4a97966577934f45b8d5988e2fbd4d33125a1c601c8a44d6ef150b3707df52da07d5ff6519c64a461bdaad1869d6ed
7
- data.tar.gz: 53766bae9993a4e3b5d064101d28023c435ea19ad051f2b05050674b1609fc4e7efbf644852630b2a7b58ddab362cde94d8360ce1d637d528ea83ed7350eb63d
6
+ metadata.gz: 5ea8be6aa2319d3bf853620071b38057cf0f3d200de098fac7147b165324c25b777ad91f700babad93ab1b9ab07456baf0287f1ad463b7cf7efcb89feb0b43d3
7
+ data.tar.gz: 21357ebd7d9781b2fcbdeacd5b31854a905a4f6bcdb07917d9519cd020d4a97b51a598df8b48bbaf7a4f283ed7f7cdeabcac011f6286905c5f0476f0345a7d9a
@@ -65,7 +65,7 @@ module Bunny
65
65
  class TCPConnectionFailed < Exception
66
66
  attr_reader :hostname, :port
67
67
 
68
- def initialize(e, hostname, port)
68
+ def initialize(e, hostname=nil, port=nil)
69
69
  m = case e
70
70
  when String then
71
71
  e
data/lib/bunny/session.rb CHANGED
@@ -285,7 +285,7 @@ module Bunny
285
285
  @logger.warn "Retrying connection on next host in line: #{@transport.host}:#{@transport.port}"
286
286
 
287
287
  return self.start
288
- rescue Exception
288
+ rescue
289
289
  @status_mutex.synchronize { @status = :not_connected }
290
290
  raise
291
291
  end
@@ -961,13 +961,11 @@ module Bunny
961
961
  fr
962
962
  # frame timeout means the broker has closed the TCP connection, which it
963
963
  # does per 0.9.1 spec.
964
- rescue Errno::ECONNRESET, ClientTimeout, AMQ::Protocol::EmptyResponseError, EOFError, IOError => e
964
+ rescue
965
965
  nil
966
966
  end
967
967
  if frame.nil?
968
- @state = :closed
969
- @logger.error "RabbitMQ closed TCP connection before AMQP 0.9.1 connection was finalized. Most likely this means authentication failure."
970
- raise Bunny::PossibleAuthenticationFailureError.new(self.user, self.vhost, self.password.size)
968
+ raise TCPConnectionFailed.new('An empty frame was received while opening the connection. In RabbitMQ <= 3.1 this could mean an authentication issue.')
971
969
  end
972
970
 
973
971
  response = frame.decode_payload
@@ -1011,13 +1009,11 @@ module Bunny
1011
1009
  fr
1012
1010
  # frame timeout means the broker has closed the TCP connection, which it
1013
1011
  # does per 0.9.1 spec.
1014
- rescue Errno::ECONNRESET, ClientTimeout, AMQ::Protocol::EmptyResponseError, EOFError => e
1012
+ rescue
1015
1013
  nil
1016
1014
  end
1017
1015
  if frame2.nil?
1018
- @state = :closed
1019
- @logger.warn "RabbitMQ closed TCP connection before AMQP 0.9.1 connection was finalized. Most likely this means authentication failure."
1020
- raise Bunny::PossibleAuthenticationFailureError.new(self.user, self.vhost, self.password.size)
1016
+ raise TCPConnectionFailed.new('An empty frame was received while opening the connection. In RabbitMQ <= 3.1 this could mean an authentication issue.')
1021
1017
  end
1022
1018
  connection_open_ok = frame2.decode_payload
1023
1019
 
data/lib/bunny/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "1.5.0.pre1"
5
+ VERSION = "1.5.0.pre2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre1
4
+ version: 1.5.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Duncan
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-09-25 00:00:00.000000000 Z
15
+ date: 2014-09-30 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol