Commit a0465ac8 authored by Ian Ward's avatar Ian Ward

error on timeout now handled by jackpot

parent 658218e2
......@@ -155,11 +155,6 @@ Client.config = {
, idleTimeout = function() {
Manager.remove(this);
}
, connectTimeout = function() {
memcached.connectionIssue('Stream connect timeout', S);
Manager.remove(this);
memcached.makeCallback(callback, new Error('Stream connect timeout'));
}
, streamError = function() {
memcached.connectionIssue('Stream error', S);
Manager.remove(this);
......@@ -183,11 +178,8 @@ Client.config = {
Manager.remove(this);
}
, data: curry(memcached, privates.buffer, S)
, timeout: connectTimeout
, error: streamError
, connect: function streamConnect() {
// Remove connection timeout listener
this.setTimeout(0, connectTimeout);
// Close idle connections
this.setTimeout(this.memcached.idle, idleTimeout);
}
......
......@@ -187,7 +187,7 @@ describe('Memcached connections', function () {
failures: 0 });
memcached.get('idontcare', function(err) {
assert.throws(function() { throw err }, /Stream connect timeout/);
assert.throws(function() { throw err }, /Timed out while trying to establish connection/);
memcached.end();
done();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment