gilmour-em-hiredis 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/em-hiredis/base_client.rb +9 -2
- data/lib/em-hiredis/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: bff9d2879a4dab3c06c811c8f5603ec6d410d833
|
4
|
+
data.tar.gz: 47a7690848aabc0a1fdb8a23dc4116d75e3c8bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a73672bf42045e373eba238a40e8104624ebcd0c72b50e4cabe21278c8a8e4eed3779e6f1720dd706839f4196e80877c9b5946fa3f4546f80857310ccf0e038
|
7
|
+
data.tar.gz: df0fe23e77d9c72e9e6ce727c393f5445ca2567735f4bcc70c4751daefc177117edb914d1acc8cde0b7f1a73b8f1869bffb5d49df909a9f7cd82276ff84c2745
|
@@ -210,8 +210,15 @@ module EventMachine::Hiredis
|
|
210
210
|
deferred.callback { |result| yield(result) } if block_given?
|
211
211
|
|
212
212
|
if @connected
|
213
|
-
@connection.send_command(sym, args)
|
214
|
-
@
|
213
|
+
res = @connection.send_command(sym, args)
|
214
|
+
# @connected can be in a stale state. send_command will fail and return
|
215
|
+
# 0 (if EM pure_ruby implmentation is not used). In that case, queue up
|
216
|
+
# the command once to be retried on reconnection
|
217
|
+
if res && res.kind_of?(Numeric) && res == 0
|
218
|
+
@command_queue << [deferred, sym, args]
|
219
|
+
else
|
220
|
+
@defs.push(deferred)
|
221
|
+
end
|
215
222
|
elsif @failed
|
216
223
|
deferred.fail(Error.new("Redis connection in failed state"))
|
217
224
|
else
|
data/lib/em-hiredis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gilmour-em-hiredis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martyn Loughran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|