ruby_skynet 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: db463c6efbc6b84b670681ac67fd39358dcdcfd1
4
- data.tar.gz: 6f18c09efa035cc23435b5a29a8a16c75dcd7437
3
+ metadata.gz: 5f1e38e477bd5d92759de3ac96e94720dd428540
4
+ data.tar.gz: 5f89a80dd5743bacd37897bbac830544a541a20b
5
5
  SHA512:
6
- metadata.gz: e763b084264b1073831234160c328f9e594d0d33c228240b7487bac01c5fcb9422fd20910a0e3beeca0a38d5cb5f7e1c8521bb49c7751bdbc790bc974c815cb8
7
- data.tar.gz: 41976bc92888af6ba2d1e20d75b5babac0d1b5b03b0f38da10489d2e4e9121557bca532c1e9f1ca1f76e8c2adbcc05e6c1af331ae77edd5d0782304bde56bf5f
6
+ metadata.gz: 7c360e3ee13e3b8842f7e13d99fcc0f8297f1a477c4c620024e60e0df3c8ad26da63abd67548861f5a431a944c82af826ab34f3e7b521a573be126ba7801ae78
7
+ data.tar.gz: 2188919064429f4e6e01348378293c627bd4fda7447304929dd8e21ddb21ea461f4a4f92c9d69e0b734ac06616e02e2e7b10fb0af4d5be1421c6011f4a95fdb9
@@ -1,3 +1,3 @@
1
1
  module RubySkynet #:nodoc
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -388,7 +388,9 @@ module RubySkynet
388
388
  # Do not close the current connection since this background watcher thread is running
389
389
  # as part of the current zookeeper connection
390
390
  # event_hash => {:req_id=>-1, :type=>-1, :state=>-112, :path=>"", :context=>nil}
391
- Thread.new { self.init } if (event_hash[:req_id] == -1) && (event_hash[:state] == ::Zookeeper::ZOO_EXPIRED_SESSION_STATE)
391
+ if @zookeeper && !@zookeeper.closed? && (event_hash[:req_id] == -1) && (event_hash[:state] == ::Zookeeper::ZOO_EXPIRED_SESSION_STATE)
392
+ Thread.new { self.init }
393
+ end
392
394
 
393
395
  when ::Zookeeper::ZOO_NOTWATCHING_EVENT
394
396
  logger.debug "Ignoring ZOO_NOTWATCHING_EVENT", event_hash
@@ -529,9 +531,6 @@ module RubySkynet
529
531
  @zookeeper.close if @zookeeper
530
532
  # Create Zookeeper connection
531
533
  @zookeeper = ::Zookeeper.new(@servers, @connect_timeout, watcher)
532
- at_exit do
533
- @zookeeper.close if @zookeeper
534
- end
535
534
 
536
535
  # Start watching registry for any changes
537
536
  get_recursive(@root, watch=true, create_path=true, &@block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_skynet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-19 00:00:00.000000000 Z
11
+ date: 2013-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger