extended the README.md [ci skip]
This commit is contained in:
@ -68,7 +68,8 @@ Client.prototype.ping = function (params, cb) {
|
||||
|
||||
this.config.transport.request({
|
||||
method: 'HEAD',
|
||||
path: '/'
|
||||
path: '/',
|
||||
timeout: 100,
|
||||
}, cb);
|
||||
};
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ ConnectionAbstract.prototype.ping = function (params, cb) {
|
||||
return this.request({
|
||||
path: '/',
|
||||
method: 'HEAD',
|
||||
timeout: '100'
|
||||
timeout: 100
|
||||
}, cb);
|
||||
};
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user