bunny 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +7 -0
- data/lib/bunny/session.rb +7 -1
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/heartbeat_spec.rb +25 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14d586f46e53649e9c27b63b5607675dc839cc9e
|
4
|
+
data.tar.gz: fa41d53c74c60948e416ba3587e9b79e1facf2ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa29c50cc14e1876594b664574a3948a4fec74643add577116a950f64da2ec079d4ca84347b59b16844f4f4a966b8b2ba9eb78d84b952977391ce6cefa0132f9
|
7
|
+
data.tar.gz: 9b7d163bd2ec192bb92c4e1e0700ecc0d72a14c57f0a05e4e425066f3132871dba0ebe8c746f50ff058f412888e673dd4bd0efd5e88ba86d02fe2da80db82e15
|
data/ChangeLog.md
CHANGED
data/lib/bunny/session.rb
CHANGED
@@ -999,7 +999,13 @@ module Bunny
|
|
999
999
|
|
1000
1000
|
# We set the read_write_timeout to twice the heartbeat value
|
1001
1001
|
# This allows us to miss a single heartbeat before we time out the socket.
|
1002
|
-
@transport.read_timeout = @
|
1002
|
+
@transport.read_timeout = if heartbeat_disabled?(@client_heartbeat)
|
1003
|
+
Transport::DEFAULT_READ_TIMEOUT
|
1004
|
+
else
|
1005
|
+
# pad to account for edge cases. MK.
|
1006
|
+
@heartbeat * 2.2
|
1007
|
+
end
|
1008
|
+
|
1003
1009
|
|
1004
1010
|
# if there are existing channels we've just recovered from
|
1005
1011
|
# a network failure and need to fix the allocated set. See issue 205. MK.
|
data/lib/bunny/version.rb
CHANGED
@@ -1,16 +1,34 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe "Client-defined heartbeat interval" do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
context "with value > 0" do
|
5
|
+
let(:connection) do
|
6
|
+
c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed", :heartbeat_interval => 4)
|
7
|
+
c.start
|
8
|
+
c
|
9
|
+
end
|
10
|
+
|
11
|
+
it "can be enabled explicitly" do
|
12
|
+
sleep 5.0
|
13
|
+
|
14
|
+
connection.close
|
15
|
+
end
|
8
16
|
end
|
9
17
|
|
10
|
-
|
11
|
-
|
18
|
+
# issue 267
|
19
|
+
context "with value = 0" do
|
20
|
+
let(:connection) do
|
21
|
+
c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed",
|
22
|
+
:heartbeat_interval => 0, :automatically_recover => false)
|
23
|
+
c.start
|
24
|
+
c
|
25
|
+
end
|
12
26
|
|
13
|
-
|
27
|
+
it "disables heartbeats" do
|
28
|
+
sleep 1.0
|
29
|
+
|
30
|
+
connection.close
|
31
|
+
end
|
14
32
|
end
|
15
33
|
end
|
16
34
|
|
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.6.
|
4
|
+
version: 1.6.3
|
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-11-
|
15
|
+
date: 2014-11-09 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|