extended the README.md [ci skip]

This commit is contained in:
Spencer Alger
2013-11-07 16:22:20 -07:00
parent 28e99cf16b
commit e68eeabf96
7 changed files with 200 additions and 103 deletions

View File

@ -68,7 +68,8 @@ Client.prototype.ping = function (params, cb) {
this.config.transport.request({
method: 'HEAD',
path: '/'
path: '/',
timeout: 100,
}, cb);
};

View File

@ -45,7 +45,7 @@ ConnectionAbstract.prototype.ping = function (params, cb) {
return this.request({
path: '/',
method: 'HEAD',
timeout: '100'
timeout: 100
}, cb);
};

View File

@ -22,6 +22,15 @@ errors.ConnectionFault = function ConnectionFault(msg) {
};
_.inherits(errors.ConnectionFault, ErrorAbstract);
/**
* No Living Connections
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.NoConnections = function NoConnections(msg) {
ErrorAbstract.call(this, msg || 'No Living connections', errors.NoConnections);
};
_.inherits(errors.NoConnections, ErrorAbstract);
/**
* Generic Error
* @param {String} [msg] - An error message that will probably end up in a log.

View File

@ -64,7 +64,7 @@ TransportRequest.prototype._sendReqWithCon = _.handler(function (err, con) {
this._request = con.request(this._params.req, this.bound._checkRespForFail);
} else {
this._log.warning('No living connections');
this._respond(new errors.ConnectionFault('No living connections.'));
this._respond(new errors.NoConnections());
}
});