Skip to content

request.abort() should clear timeoutTimer #256

Closed

Description

@alexguan

When sending request to a slow server with a short timeout value, before the server returns back anything, calling request.abort does not clear timeoutTimer. The ETIMEDOUT error will still be reported.

e.g.

var r = request.get('http://slowserver', request.defaults({ timeout : 10000 } ));

r.on('error', function (error) {
  //We should not see ETIMEDOUT error here
  console.log(error);
});

r.pipe(...);

process.nextTick(function () {
  r.abort();
});

Activity

  1. mikeal commented on Aug 27, 2014

    @mikeal
    Member

    Is this still an issue?

    This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

  2. furstenheim commented on Aug 22, 2017

    @furstenheim

    Getting same issue with node 7 and request 2.81.0

  3. furstenheim-geoblink commented on Oct 23, 2019

    @furstenheim-geoblink

    Maybe this issue is related to this issue in Node? nodejs/node#20077
    which was fixed in Node 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions