nogara-redis_failover 0.9.7.2 → 0.9.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,8 +18,6 @@ module RedisFailover
18
18
  @node = node
19
19
  @max_failures = max_failures
20
20
  @monitor_thread = nil
21
- @shutdown_lock = Mutex.new
22
- @shutdown_cv = ConditionVariable.new
23
21
  @done = false
24
22
  end
25
23
 
@@ -34,15 +32,13 @@ module RedisFailover
34
32
 
35
33
  # Performs a graceful shutdown of this watcher.
36
34
  def shutdown
37
- @shutdown_lock.synchronize do
38
- @done = true
39
- begin
40
- @node.wakeup
41
- rescue
42
- # best effort
43
- end
44
- @shutdown_cv.wait(@shutdown_lock)
35
+ @done = true
36
+ begin
37
+ @node.wakeup
38
+ rescue
39
+ # best effort
45
40
  end
41
+ @monitor_thread.join
46
42
  rescue => ex
47
43
  logger.warn("Failed to gracefully shutdown watcher for #{@node}")
48
44
  end
@@ -74,10 +70,6 @@ module RedisFailover
74
70
  logger.error(ex.backtrace.join("\n"))
75
71
  end
76
72
  end
77
-
78
- @shutdown_lock.synchronize do
79
- @shutdown_cv.broadcast
80
- end
81
73
  end
82
74
 
83
75
  # Notifies the manager of a node's state.
@@ -1,3 +1,3 @@
1
1
  module RedisFailover
2
- VERSION = '0.9.7.2'
2
+ VERSION = '0.9.7.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nogara-redis_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7.2
4
+ version: 0.9.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: