nats 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/nats/client.rb +2 -2
- data/lib/nats/server/const.rb +1 -1
- data/nats.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdd90752229d1b9e8958d4a29b02951ce3107d93
|
4
|
+
data.tar.gz: 0f7ddb25822e6be88d025d8a1ab200470b7c5a2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0543c590534e277b2b95077d564acdc0055478e04655fa24030022f34bd14bd0a7fd5450288c89984106f0832d68088053fdec3555a3f6bf6c4f0630efdfb2c
|
7
|
+
data.tar.gz: 9207aac064c91db634a100a01f482696ffa0362ce257ab44661c921b9fab408206009fc082fd20ade7c67521c625b36ae1a7d1d278c8d70b6645177b9687f5cd
|
data/README.md
CHANGED
@@ -83,7 +83,7 @@ NATS.subscribe(subject, :queue => 'job.workers') { |msg| puts "Received '#{msg}'
|
|
83
83
|
NATS.start(:servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223'] do |c|
|
84
84
|
puts "NATS is connected to #{c.connected_server}"
|
85
85
|
c.on_reconnect do
|
86
|
-
puts "Reconnected to server at #{c.connected_server}
|
86
|
+
puts "Reconnected to server at #{c.connected_server}"
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -91,7 +91,7 @@ opts = {
|
|
91
91
|
:dont_randomize_servers => true,
|
92
92
|
:reconnect_time_wait => 0.5,
|
93
93
|
:max_reconnect_attempts = 10,
|
94
|
-
:servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223', 'nats://127.0.0.1:4224]
|
94
|
+
:servers => ['nats://127.0.0.1:4222', 'nats://127.0.0.1:4223', 'nats://127.0.0.1:4224']
|
95
95
|
}
|
96
96
|
|
97
97
|
NATS.connect(opts) do |c|
|
data/lib/nats/client.rb
CHANGED
@@ -9,7 +9,7 @@ require "#{ep}/ext/json"
|
|
9
9
|
|
10
10
|
module NATS
|
11
11
|
|
12
|
-
VERSION = "0.5.
|
12
|
+
VERSION = "0.5.1".freeze
|
13
13
|
|
14
14
|
DEFAULT_PORT = 4222
|
15
15
|
DEFAULT_URI = "nats://localhost:#{DEFAULT_PORT}".freeze
|
@@ -791,7 +791,7 @@ module NATS
|
|
791
791
|
# Dump the one we were trying if it wasn't connected
|
792
792
|
current = server_pool.shift
|
793
793
|
# FIXME(dlc) - Should we remove from the list on error?
|
794
|
-
server_pool << current if (current && can_reuse_server?(current) && !current[:error_received])
|
794
|
+
server_pool << current if (current && (options[:max_reconnect_attempts] < 0 || can_reuse_server?(current) && !current[:error_received]))
|
795
795
|
# If we are out of options, go ahead and disconnect.
|
796
796
|
process_disconnect and return if server_pool.empty?
|
797
797
|
# bind new one
|
data/lib/nats/server/const.rb
CHANGED
data/nats.gemspec
CHANGED
@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
|
|
17
17
|
s.authors = ['Derek Collison']
|
18
18
|
s.email = ['derek.collison@gmail.com']
|
19
19
|
|
20
|
-
s.add_dependency('eventmachine', '~> 1.0', '
|
20
|
+
s.add_dependency('eventmachine', '~> 1.0', '= 1.0.7')
|
21
21
|
s.add_dependency('json_pure', '~> 1.8', '>= 1.8.1')
|
22
22
|
s.add_dependency('daemons', '~> 1.1', '>= 1.2.2')
|
23
23
|
s.add_dependency('thin', '~> 1.6', '>= 1.6.3')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Collison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
|
-
- -
|
20
|
+
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.7
|
23
23
|
type: :runtime
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1.0'
|
30
|
-
- -
|
30
|
+
- - '='
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.7
|
33
33
|
- !ruby/object:Gem::Dependency
|