bunny-ext 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -78,5 +78,22 @@ module Qrack
78
78
 
79
79
  @socket
80
80
  end
81
+
82
+ def close
83
+ return if @socket.nil? || @socket.closed?
84
+
85
+ # Close all active channels
86
+ channels.each { |c| Bunny::Timer::timeout(@socket_timeout) { c.close if c.open? } }
87
+
88
+ # Close connection to AMQP server
89
+ Bunny::Timer::timeout(@socket_timeout) { close_connection }
90
+ ensure
91
+ @channels = []
92
+ # Close TCP Socket
93
+ close_socket
94
+ end
95
+
96
+ alias stop close
97
+
81
98
  end
82
99
  end
@@ -1,5 +1,5 @@
1
1
  module Bunny
2
2
  module Ext
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny-ext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 3
10
+ version: 0.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Kaes
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-30 00:00:00 +01:00
19
+ date: 2010-12-06 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency