Permalink
Browse files

use net.createConnection

  • Loading branch information...
1 parent acd277a commit 8283c600e12052bdd854d7e59a52e02a306b7542 @aeosynth aeosynth committed Feb 13, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 hiredis.js
View
@@ -3,10 +3,9 @@ var hiredis = require("./build/default/hiredis"),
exports.Reader = hiredis.Reader;
exports.createConnection = function(port, host) {
- var s = new net.Stream();
+ var s = net.createConnection(port || 6379, host);
var r = new hiredis.Reader();
var _write = s.write;
- s.connect(port || 6379, host);
s.write = function() {
var i, args = arguments;

0 comments on commit 8283c60

Please sign in to comment.