diff --git a/README.markdown b/README.markdown index a738468..7e2bf5a 100644 --- a/README.markdown +++ b/README.markdown @@ -5,7 +5,7 @@ Usage: var limestone = require("./limestone").SphinxClient(), sys = require("sys"); - limestone.connect(9312, // port. 9312 is standard Sphinx port + limestone.connect(9312, // port. 9312 is standard Sphinx port. also 'host:port' allowed function(err) { // callback if (err) { sys.puts('Connection error: ' + err); diff --git a/limestone.js b/limestone.js index 3ad3458..6bf9863 100644 --- a/limestone.js +++ b/limestone.js @@ -121,10 +121,8 @@ exports.SphinxClient = function() { var host = hostport[0].trim().length ? hostport[0].trim(): 'localhost' ; var port = hostport[1].trim().length ? hostport[1].trim() : Sphinx.port; - - var persistent = _persistent = args.length ? args.shift() : false; - console.log('connecting to : '+host+':'+port); + server_conn = tcp.createConnection(port, host); server_conn.on('error', function(x){ console.log('Error: '+x);