march_hare 2.0.0.rc1-java → 2.0.0.rc2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -108,7 +108,14 @@ module MarchHare
108
108
  end
109
109
 
110
110
  def cancel
111
- @channel.basic_cancel(consumer_tag)
111
+ if @cancelling.get_and_set(true)
112
+ false
113
+ else
114
+ @channel.basic_cancel(@consumer_tag)
115
+ @cancelled.set(true)
116
+ @terminated.set(true)
117
+ true
118
+ end
112
119
  end
113
120
  end
114
121
  end
@@ -14,14 +14,9 @@ module MarchHare
14
14
  end
15
15
 
16
16
  def cancel
17
- @cancelling.set(true)
18
- response = channel.basic_cancel(consumer_tag)
19
- @cancelled.set(true)
20
-
21
- @internal_queue.offer(POISON)
22
- @terminated.set(true)
23
-
24
- response
17
+ if super
18
+ @internal_queue.offer(POISON)
19
+ end
25
20
  end
26
21
 
27
22
  def start
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module MarchHare
4
- VERSION = "2.0.0.rc1"
4
+ VERSION = "2.0.0.rc2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: march_hare
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.0.rc2
5
5
  prerelease: 6
6
6
  platform: java
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-11 00:00:00.000000000 Z
13
+ date: 2013-09-13 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
16
16
  email: