要改就改好，不能明知不好还不修改
On Mar 20, 2013 9:37 AM, "windyrobin" <notifications@github.com> wrote:

> In lib/http-client.js:
>
> > -  }, timeout);
> > -
> > -  client.on('error', function (err) {
> > -    if (timer) {
> > -      clearTimeout(timer);
> > -      timer = null;
> > -    }
> > -    if (client.__isTimeout) {
> > -      err.name = 'RequestTimeoutError';
> > -      err.message = 'Request Timeout after ' + timeout + 'ms.';
> > -    } else if (err.name === 'Error') {
> > -      err.name = 'RequestError';
> > -    }
> > -    if (err.message) {
> > -      err.message += ' (' + host.host + ':' + host.port + ')';
> > +      callback(iError(err, (err.code == 'REQUESTTIMEOUT') ? 'RequestTimeout' : 'Unknown'));
>
> 这次改动只为增加retry 机制，对原先的接口逻辑不做任何修改--即使他们或许不太合理
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/aleafs/itier-client/pull/18/files#r3444344>
> .
>