Brian Noguchi
64a0e68927
Add fix for last test (re-establish pub_sub_mode = true)
2012-03-12 23:03:46 -07:00
Brian Noguchi
2afa0e5acc
Add failing test.
...
The test demonstrates failure for the following scenario. A single-subscription
client calls unsubscribe immediately followed by a subscribe. It will fail when
it tries to receive the next pmessage/message because the client will be in
false pub_sub_mode. Here is why it is false: First, the 2nd subscribe sets
pub_sub_mode to true during send_command. Next, the unsubscribe's
return_reply sets pub_sub_mode to false. The 2nd subscribe's return_reply does
not re-set pub_sub_mode back to true. So the result is a client with false
pub_sub_mode that fails upon receipt of the next message or pmessage.
2012-03-12 22:59:38 -07:00
Brian Noguchi
5a5af9a4f9
Add comma to package.json
2012-03-12 22:17:13 -07:00
Matt Ranney
a02e058df7
Merge pull request #183 from DTrejo/master
...
How to correctly auth to server; what error to look for if you're doing it wrong; emit Error objects not string
2012-03-05 18:04:19 -08:00
David Trejo
cd5db44f66
readme: how to correctly auth to server, what error looks like if done wrong
2012-03-05 17:31:47 -05:00
David Trejo
234ae6be9a
Emit Error objects not strings
2012-03-05 17:29:54 -05:00
David Trejo
5afa763c89
readme code formatting
2012-03-05 15:31:43 -05:00
Matt Ranney
c0e1ac8037
Merge pull request #167 from isaacs/patch-1
...
List hiredis as an optional dependency.
2012-02-02 18:08:18 -08:00
Isaac Z. Schlueter
29a416b7a5
List hiredis as an optional dependency.
...
This will cause npm to attempt to install hiredis when installing redis,
but if the hiredis installation fails, it won't cause the redis install
to abort.
The optionalDependencies feature was added pretty much explicitly
for the redis->hiredis use case. :)
2012-02-02 17:42:55 -08:00
TEHEK Firefox
1896d7ce1f
Fix for [GH-165] - createClient to properly assign parser_module
2012-01-27 13:35:56 -08:00
Matt Ranney
3a7c6388de
Fix for [GH-93] - restore subscriptions, monitor, db, and auth on reconnect.
...
Also fixes bug with re-selecting db when auth is required.
Still needs a test for pub/sub reconnect and monitor reconnect.
2011-11-16 17:27:26 -10:00
Matt Ranney
642df49924
Further document no_ready_check.
2011-11-16 17:26:58 -10:00
Matt Ranney
faca4a8dc9
Bounds checking on Array expansion magic.
2011-11-16 12:10:19 -10:00
Matt Ranney
b9734d13eb
Add socket_nodelay option to control Nagle. Fixes [GH-33]
2011-11-16 11:12:26 -10:00
Matt Ranney
bf806a0be3
Better util/sys fallback with try/catch instead of version magic.
2011-11-16 10:57:02 -10:00
Zachary Scott
c83c285213
remove double 'util' and 'Queue' from requires
...
ex: require('./lib/util').util;
2011-11-16 10:37:38 -10:00
Matt Ranney
336030a33d
Fix documentation for detect_buffers.
2011-11-16 10:29:58 -10:00
Matt Ranney
64ad9ede42
Add test for [GH-148] - detect_buffers option
2011-11-15 20:27:56 -10:00
Matt Ranney
461ed06fab
Doc update for [GH-148] fix.
2011-11-15 19:40:50 -10:00
Matt Ranney
edf46776a1
Merge remote-tracking branch 'dayananda/master'
...
Conflicts:
index.js
2011-11-15 19:40:24 -10:00
Matt Ranney
69092a3f26
[GH-67] - hgetall now returns null instead of {} on empty reply
2011-11-15 15:21:49 -10:00
Matt Ranney
e39e8421bc
Fix regression in reconnect logic.
...
Very much need automated tests for reconnection and queue logic.
v0.7.1
2011-11-15 10:48:45 -10:00
Matt Ranney
5834f63dd3
Fix month in changelog.
2011-11-14 23:37:45 -10:00
Matt Ranney
ff9ac4bf34
Add eval example.
2011-11-14 20:43:32 -10:00
Matt Ranney
a4e8c748df
Changes for v0.7.0.
v0.7.0
2011-11-14 20:41:38 -10:00
Matt Ranney
ed44b8f702
Bump version.
2011-11-14 20:23:22 -10:00
Matt Ranney
29c408cbf1
Update TODO comment for retry thresholds.
2011-11-14 20:23:11 -10:00
Matt Ranney
dfd4c51b79
Merge pull request #136 from bobrik/callback-fixes
...
added ability to pass undefined instead of callback
2011-11-14 22:15:36 -08:00
Matt Ranney
90aa21936c
Update TODO comment
2011-11-14 20:14:49 -10:00
Matt Ranney
8d0457f2c3
Add test for monitor command.
2011-11-13 21:18:12 -10:00
Matt Ranney
719c606b78
Fix test for optional subscribe callback.
2011-11-13 21:03:32 -10:00
Matt Ranney
6232d35993
Subscribe commands take optional callback. Fixes [GH-140].
2011-11-13 21:01:15 -10:00
Matt Ranney
6a44331acd
Fix this/self reference on db re-select.
2011-11-13 20:19:34 -10:00
Matt Ranney
dfcfaf3dc5
Fix style.
2011-11-13 20:12:22 -10:00
Matt Ranney
82cc930bc7
Merge pull request #142 from oxys/master
...
After a connection error, selected db, if it was set, is not restored
2011-11-13 21:57:32 -08:00
Matt Ranney
6e38f4d6e0
Merge pull request #146 from maks/master
...
added sort example
2011-11-13 21:09:25 -08:00
Matt Ranney
16c79f0d18
Merge pull request #139 from felixge/master
...
Fix: Hiredis parser traps pubsub event exceptions
2011-11-13 20:23:23 -08:00
Matt Ranney
abd32ce407
Add metrics to devDependencies.
2011-11-13 18:20:00 -10:00
Matt Ranney
66a32f86dc
new version of multi_bench that tests more realistic scenarios.
2011-11-13 18:13:28 -10:00
Matt Ranney
2fa2ffc438
Remove reference to arguments which was unused and de-optimizes the constructor.
2011-11-13 18:12:53 -10:00
Matt Ranney
0c8646bc61
Use number literals for case labels to help V8 go faster.
2011-11-13 18:12:28 -10:00
Matt Ranney
b633587b49
Fix flush+error bug on server disconnect.
...
Also assign a client ID to each client because stream.fd isn't available in node 0.6.
2011-11-13 18:11:28 -10:00
Matt Ranney
f2a6a20a74
Send quit command right away.
...
The quit/pipeline bug has been fixed in Redis server for some time now.
2011-11-13 18:10:22 -10:00
Matt Ranney
c74657cdfa
Improved reconnect logic. Initial version of reconnect thresholds.
2011-11-10 13:09:39 -10:00
Matt Ranney
8e338c6136
node 0.6 fixes
2011-11-10 13:05:46 -10:00
Owen Smith
54cf583dc3
Support new option 'max_attempts' to specify a total number of connection retries
2011-11-10 13:05:46 -10:00
Owen Smith
025c2e938e
Support new option 'connect_timeout' to stop connection retries after the number of ms specified
2011-11-10 13:03:51 -10:00
Matt Ranney
8a2c1ad227
Merge pull request #141 from felixge/missing-self
...
Fix bad reference to 'this'
2011-11-10 14:55:38 -08:00
Dayananda Nanjundappa
a6670edb9a
Support for retrieving data as Buffer on a per command basis
...
This is achieved by introducing a new option to the createClient method called bufferedInput.
If bufferedInput is set to true, then the returned data will be a Buffer if the command argument passed is a buffer
E.g.
var redis = require("redis"),
client = redis.createClient(<port>, <host>, {buffered_input: true});
client.set("foo_rand000000000000", "OK");
// The below get request will return a utf8 string
client.get("foo_rand000000000000", function (err, reply) {
console.log(reply.toString()); // Will print `OK`
});
// The below get request will return a Buffer as the key is specified as a Buffer
client.get(new Buffer("foo_rand000000000000"), function (err, reply) {
console.log(reply.toString()); // Will print `<Buffer 4f 4b>`
});
client.end();
2011-11-03 16:32:47 +05:30
Maksim Lin
804970f895
added handy example of using sort command using code posted by linus in mranney/node_redis/#103
2011-10-27 15:11:12 +11:00