bunny 2.14.3 → 2.14.4

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
  SHA256:
3
- metadata.gz: c29f135d76d09fb4260a945a620a80d281b5194ea55bdd9e4fd1f43b9e849544
4
- data.tar.gz: 23ff6197091a0d373fbad760dba33ec199bbacd85d274f4a828afd8d78b2d28c
3
+ metadata.gz: cf0bcb6bc92f6092788f0eeffed76f438be49f1341857a6e5a94254544cf44e3
4
+ data.tar.gz: 317240a20f888087e959999b7cbe10d57fe423316032bc6fa6f2a6733e8dd50c
5
5
  SHA512:
6
- metadata.gz: 4c73f2103a2c7ab9df2ae497592e37c5d28c2e92ff2e8833337375859aa7eb08082952cf1314762df9fe3599b4fb958050ea4242d13c8cf4283ce0cf4bfa0315
7
- data.tar.gz: 3ab49bec79e0bbacd7e06d3e9d84b0dbb3a3dac0c3cbbf131a96b51c1c6c5fdd50b2cc85d94a5f8bbc9440f6a4a976cdc6e3669d1c1ccf49639f976156cafb50
6
+ metadata.gz: d0c159c08871fdf203a322543489d9c563d45c855f407f9e069adc6f3f0d97f7b0fb8d7ac90a5280dfdc2cea81dbef53e0c2b217be2064373432d0ca0d889626
7
+ data.tar.gz: 4d8a071b4d8494ad3976d842a705cf3d8323d8c14c61a0c147c309cc07ebc77bf6420243a597c68a3cde9b4b7a6cb5f17e25bab7972cf607f1d1d55b8bd88cdb
@@ -1,3 +1,4 @@
1
+ dist: bionic
1
2
  language: ruby
2
3
  bundler_args: --without development
3
4
  cache: bundler
@@ -10,10 +11,10 @@ before_script:
10
11
  script: "bundle exec rake integration_without_recovery"
11
12
  rvm:
12
13
  - ruby-head
13
- - "2.6.0"
14
- - "2.5.1"
15
- - "2.4.2"
16
- - "2.3.5"
14
+ - "2.6.3"
15
+ - "2.5.5"
16
+ - "2.4.5"
17
+ - "2.3.8"
17
18
  notifications:
18
19
  email: michael@rabbitmq.com
19
20
  services:
@@ -1,6 +1,25 @@
1
- ## Changes between Bunny 2.14.3 and 2.14.4 (in development)
1
+ ## Changes between Bunny 2.14.4 and 2.14.5 (in development)
2
2
 
3
- No changes yet.
3
+ No changes.
4
+
5
+
6
+ ## Changes between Bunny 2.14.3 and 2.14.4 (Feb 11th, 2020)
7
+
8
+ ### More Defensive Thread Join Operations
9
+
10
+ Bunny is now more defensive around thread join operations which it performs
11
+ when stopping its consumer work pool.
12
+
13
+ `Thread#join` can cause an unhandled exception to be re-raised at
14
+ a very surprising moment. This behavior can also be affected by 3rd party
15
+ libraries, e.g. those that do connection pooling. While Bunny cannot
16
+ fully avoid every possible surprising failure, it now avoids at least
17
+ one such problematic interaction triggered by a custom [interrupt handler](https://ruby-doc.org/core-2.5.1/Thread.html#method-c-handle_interrupt)
18
+ in a 3rd party library.
19
+
20
+ GitHub issue: [#589](https://github.com/ruby-amqp/bunny/issues/589)
21
+
22
+ Contributed by @fuegas.
4
23
 
5
24
 
6
25
  ## Changes between Bunny 2.14.2 and 2.14.3 (Sep 29th, 2019)
data/README.md CHANGED
@@ -48,7 +48,7 @@ Specific examples:
48
48
 
49
49
  Modern Bunny versions support
50
50
 
51
- * CRuby 2.2 through 2.5 (inclusive)
51
+ * CRuby 2.3 through 2.6 (inclusive)
52
52
 
53
53
  Bunny works sufficiently well on JRuby but there are known
54
54
  JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should
@@ -32,6 +32,9 @@ module Bunny
32
32
  socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
33
33
  end
34
34
  socket.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_KEEPALIVE, true) if options.fetch(:keepalive, true)
35
+ socket.instance_eval do
36
+ @__bunny_socket_eof_flag__ = false
37
+ end
35
38
  socket.extend self
36
39
  socket.options = { :host => host, :port => port }.merge(options)
37
40
  socket
@@ -116,7 +116,14 @@ module Bunny
116
116
  end
117
117
 
118
118
  def join
119
- @thread.join if @thread
119
+ # Thread#join can/would trigger a re-raise of an unhandled exception in this thread.
120
+ # In addition, Thread.handle_interrupt can be used by other libraries or application code
121
+ # that would make this join operation fail with an obscure exception.
122
+ # So we try to save everyone some really unpleasant debugging time by introducing
123
+ # this condition which typically would not evaluate to true anyway.
124
+ #
125
+ # See ruby-amqp/bunny#589 and ruby-amqp/bunny#590 for background.
126
+ @thread.join if @thread && @thread != Thread.current
120
127
  end
121
128
 
122
129
  def kill
@@ -171,6 +171,7 @@ module Bunny
171
171
  else
172
172
  opts[:automatically_recover] || opts[:automatic_recovery]
173
173
  end
174
+ @recovering_from_network_failure = false
174
175
  @max_recovery_attempts = opts[:recovery_attempts]
175
176
  @recovery_attempts = @max_recovery_attempts
176
177
  # When this is set, connection attempts won't be reset after
@@ -184,6 +185,7 @@ module Bunny
184
185
  @continuation_timeout = opts.fetch(:continuation_timeout, DEFAULT_CONTINUATION_TIMEOUT)
185
186
 
186
187
  @status = :not_connected
188
+ @manually_closed = false
187
189
  @blocked = false
188
190
 
189
191
  # these are negotiated with the broker during the connection tuning phase
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.14.3"
5
+ VERSION = "2.14.4"
6
6
  end
data/repl CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/bin/sh
2
2
 
3
- bundle exec ripl -Ilib -r'bunny' -r'ripl/multi_line' -r'ripl/irb'
3
+ bundle exec ruby -w `which ripl` -Ilib -r'bunny' -r'ripl/multi_line' -r'ripl/irb'
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: 2.14.3
4
+ version: 2.14.4
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: 2019-09-29 00:00:00.000000000 Z
15
+ date: 2020-02-11 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol