jomo
338b3cd9d8
Remove redundant check
...
If the first operand of the disjunction (`!obj.loading`) is false, `obj.loading` is truthy.
Thus there is no need to test it again in second operand.
2015-08-30 02:37:26 +02:00
Benjamin E. Coe
9796209550
Merge pull request #764 from Anubisss/master
...
A little optimization in a function if the client is closing.
2015-08-29 14:16:30 -07:00
Daniel Price
575ade907c
Issue #512 send_command("monitoring") is doomed to fail
2015-08-21 14:57:48 -07:00
David Vas
86f1cef781
Merge remote-tracking branch 'node_redis/master'
2015-08-18 13:09:41 +02:00
Ruben Bridgewater
a2bc597212
Add simicolons
...
This is just a style change
2015-07-22 17:51:07 +02:00
Ruben Bridgewater
1f9e536ca0
Add use strict statements
...
This is going to improve the performance minimal and improves the safety of the code
2015-07-22 17:50:37 +02:00
Ruben Bridgewater
208b7874bf
Rewrite createClient. Fixes #651
2015-07-22 17:15:12 +02:00
Raymond Myers
ded75c8ea2
Fixed detect_buffers keeping all multi/exec results as buffers
2015-07-11 22:47:25 -07:00
Raymond Myers
aea03d60be
Fixed exec result arrays being stringed in detect_buffers mode
2015-07-11 22:47:25 -07:00
Raymond Myers
f384d1c774
Fixed the pub/sub logic accidentally stringing the first value of a multi/exec response
2015-07-11 22:47:25 -07:00
Raymond Myers
6f1acb0678
Fixed bug where buffer hgetall's in a multi would throw exceptions
2015-07-11 22:47:25 -07:00
David Vas
6af443639e
A little optimization in a function if the client is closing.
2015-06-11 16:19:47 +02:00
vitaliylag
11735099d6
Update index.js
...
It was almost bug: imagine args is array but callback is not defined - in this case all args (that is consists of one array) are packing to new array. That mean we get this: this.send_command(command, [[...]]). It doesn't make any sense.
After I fix it we get this: this.send_command(command, [...], undefined). It's really ok because if we call for example client.hget("test", "aaa") we actually do the same: this.send_command("hget", ["test", "aaa"], undefined). No different from this.send_command(command, [...], undefined).
By the way, «this.send_command(command, [[...]])» could be a bug. Try to call client.eval(["return 1", 0]) and you should get throw because "eval" required 2 param, but program thinks it's only one param: ["return 1", 0] (at the beginning it was [["return 1", 0]]). There's only one reason why you don't get throw - RedisClient.prototype.eval is overridden for some optimizations, lucky. But that doesn't mean everything is ok.
2015-05-28 14:50:46 +03:00
Hiroshi Kuwabara
a67d3acdd6
added URL support to createClient
2014-09-12 12:37:32 +09:00
Bryce Baril
75b0bc97ea
Fix #645
2014-08-11 10:33:33 -07:00
Jack Tang
064260d1c5
improve the interface to better support unix socket.
...
delete client.host
delete client.port
add client.address
add client.connectionOptions
add tests.UNIX_SOCKET
update all error message to use client.address
update retry connection
2014-08-07 17:19:37 +08:00
Bryce Baril
2e3cb99011
Merge branch 'master' of https://github.com/migounette/node_redis into migounette-master
2014-07-10 22:01:34 -07:00
Bryce Baril
08a8eed111
Revert "Client to emit errors now instead of throwing them asynchronously where they're uncatchable."
...
This reverts commit 6a3ccf64f4
.
2014-07-10 21:28:48 -07:00
Bryce Baril
8b5d55fecd
Set socket_keepalive to default to true
2014-07-10 21:18:47 -07:00
Bryce Baril
b9219a0fb2
Merge branch 'set-keepalive' of https://github.com/Clever/node_redis into Clever-set-keepalive
2014-07-10 21:16:38 -07:00
Bryce Baril
c6ff90723c
Merge branch 'master' of https://github.com/ouotuo/node_redis into ouotuo-master
2014-07-10 21:12:37 -07:00
Bryce Baril
782d3333e4
Merge branch 'patch-1' of https://github.com/Raynos/node_redis into Raynos-patch-1
2014-07-10 21:10:17 -07:00
migounette
40f85aa42a
Add IPv6 and IPv4 tests
2014-07-09 10:39:08 +02:00
Iain Proctor
c687d2e4fd
Make a new stream on reconnect
2014-07-08 23:29:57 +00:00
migounette
9c68a286b1
Add full IPv6 redis connection capability in a full IPv6 network or in a mix network (IPv4 and IPv6)
2014-06-23 16:38:37 +02:00
linkangzhen
c7dbfec85c
prototype.end move on("error", to outsite
2014-05-27 09:14:01 +08:00
linkangzhen
1c983a1171
fixed redis quit,we call client.end(),remove "error" event listener,the retry_timer try to connect;when there is a "error" exception,the process will exit
2014-05-27 09:01:28 +08:00
Nick Apperson
b1d8ff9ae8
reply_to_object function is broken for binary keys
...
There is currently no way to opt out of the way hgetall works with the
node_redis library and if any of the keys have binary, they are
incorrectly converted to the charactor 0xFEFF instead. This makes it
impossible to fully use HGETALL.
2014-05-07 14:14:11 -05:00
Raynos
d34308ea4c
check process.domain is STILL currDomain
2014-04-18 13:57:35 -07:00
Raynos (Jake Verbaten)
7d61feb411
Check that process.domain
still exists
2014-04-18 13:54:16 -07:00
Mohit Gupta
d313aa5dab
param socket_keepalive to set keep-alive on socket
2014-03-25 16:33:43 -07:00
Bryan English
4672479b91
If there's an error in SELECT and there's no callback, emit the error.
2014-02-18 22:03:25 -08:00
Robert Sköld
0367a64bff
Handle undefined redis_version
...
Apparently some servers don't send the redis_version with the INFO command (*cough* redis cloud *cough*). This causes the app to crash violently (yay node!).
2014-02-17 13:26:16 +01:00
Bryce Baril
6a3ccf64f4
Client to emit errors now instead of throwing them asynchronously where they're uncatchable.
2013-12-21 11:08:00 -08:00
William Hockey
313fd7f65b
only re-initializing retry variables if the connection is really connected
2013-12-12 12:05:38 -08:00
William Hockey
355bea1e3b
Removing attempts reset - will be set to 1 in initialize_retry_vars
2013-12-12 12:04:34 -08:00
Bryce Baril
813cada02f
Merge branch 'master' of https://github.com/kwangsu61/node_redis into kwangsu61-master
2013-11-23 11:30:20 -08:00
Alex Stokes
2fbbe26127
removed trailing whitespace
2013-11-20 23:10:14 -06:00
Alex Stokes
a2695f3d17
updated RedisClient.prototype.hmset to accept string or numeric keys when calling client.hmset(key, {key1: val1, key2: val2})
2013-11-20 16:53:47 -06:00
Forrest L Norvell
2e8c6dae85
exit the domain after emitting. Thanks, cxreg!
2013-10-17 11:46:34 -07:00
Forrest L Norvell
e7099717aa
Don't bind the RedisClient to the domain; callback should suffice.
2013-10-17 11:41:37 -07:00
Forrest L Norvell
0b6870be5c
Added direct support for domains.
...
There are three pieces to this support, all of them small, and none of
them with large overhead:
1. When sending a command, ensure that any callback is bound to the
current domain, if one is present.
2. Also add the RedisClient to the current domain so that error
events bubble properly.
3. In try_callback, when a domain is in play, instead of throwing
on the next tick, emit the error on the domain. The parser can
still finish processing the response and the error ends up in
the correct place.
2013-10-17 11:41:37 -07:00
Mathieu M-Gosselin
75cf487d73
When handling the "error reply" event from the parser, we now bubble up the Error object if it's one instead of wrapping it in another Error.
2013-10-02 22:21:01 -07:00
Bryce Baril
d5c7a2ce2e
Formatting
2013-10-02 22:12:56 -07:00
David Barshow
a4f266684e
Make retry_max_delay option work correctly when retry_backoff becomes greater than one
2013-10-02 21:56:02 -07:00
bobrik
31c22be6b9
String is not an error
2013-10-02 21:35:51 -07:00
Bryce Baril
b12c49a207
Add unref() method to RedisClient that will call unref() on the socket connection, allowing it to close when unused. This is experimental because it does not yet understand the Redis protocol, so subscriptions or blocking operations will not work correctly.
2013-10-02 16:10:26 -07:00
Bryce Baril
5f125b51d4
Issue #439 (and others): Stop assuming all "message" or "pmessage" replies are pubsub replies. Check pub_sub_mode as well.
2013-10-02 14:04:28 -07:00
Bryce Baril
8f71003009
Add test for auth_pass option submitted by hpeinar
2013-07-24 08:21:28 -07:00
Kwangsu Kim
46cd9329b1
Fix TypeError when handling multi exception
...
When errors occurs using multi/exec, avoid "TypeError: Cannot read property 'length' of undefined"
2013-06-26 02:48:15 +09:00