protobuf-nats 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/lib/protobuf/nats.rb +2 -1
- data/lib/protobuf/nats/client.rb +1 -1
- data/lib/protobuf/nats/jnats.rb +3 -0
- data/lib/protobuf/nats/version.rb +1 -1
- 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: 6b4f7a7217fe39c0e3aa4b20064c3afc20bcebff
|
|
4
|
+
data.tar.gz: e6704320debc2d5241fb6a0306941a06ab44b45d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0d85a49668fea2402f44661d834b5b75284499801e245224c80c5ab528c2e9ef7771d2a5e5aadef88a5dab1c20e85e2d583fa6fecf3d3b8594bbc77a09068f7
|
|
7
|
+
data.tar.gz: 16e27c6bf470214dac9c403af3849b942501edccb675a13cb606b4014da47053908d65a86aad5dca1aa516862ffd6d588cce1c9fd63cb590397015e2d2291087
|
data/lib/protobuf/nats.rb
CHANGED
|
@@ -50,7 +50,8 @@ module Protobuf
|
|
|
50
50
|
def self.start_client_nats_connection
|
|
51
51
|
@start_client_nats_connection ||= begin
|
|
52
52
|
GET_CONNECTED_MUTEX.synchronize do
|
|
53
|
-
|
|
53
|
+
break true if @client_nats_connection
|
|
54
|
+
break true if @start_client_nats_connection
|
|
54
55
|
|
|
55
56
|
@client_nats_connection = NatsClient.new
|
|
56
57
|
@client_nats_connection.connect(config.connection_options)
|
data/lib/protobuf/nats/client.rb
CHANGED
data/lib/protobuf/nats/jnats.rb
CHANGED
|
@@ -67,8 +67,11 @@ module Protobuf
|
|
|
67
67
|
# Do not depend on #close for a greaceful disconnect.
|
|
68
68
|
def close
|
|
69
69
|
@connection.close
|
|
70
|
+
@connection = nil
|
|
70
71
|
@supervisor.kill rescue nil
|
|
72
|
+
@supervisor = nil
|
|
71
73
|
@consumer.kill rescue nil
|
|
74
|
+
@supervisor = nil
|
|
72
75
|
end
|
|
73
76
|
|
|
74
77
|
def flush(timeout_sec = 0.5)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protobuf-nats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brandon Dewitt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-04-
|
|
11
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: protobuf
|