forked from redis/node-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unref() method to RedisClient that will call unref() on the socke…
…t 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.
- Loading branch information
1 parent
5f125b5
commit b12c49a
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var redis = require("./") | ||
//redis.debug_mode = true | ||
var PORT = process.argv[2] || 6379; | ||
var HOST = process.argv[3] || '127.0.0.1'; | ||
|
||
var c = redis.createClient(PORT, HOST) | ||
c.unref() | ||
c.info(function (err, reply) { | ||
if (err) process.exit(-1) | ||
if (!reply.length) process.exit(-1) | ||
process.stdout.write(reply.length.toString()) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters