Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

connection.destroy() during http req setTimeout() causes TypeError #3231

Description

@s3u
var clientReq = http.request(options, function (clientRes) {
    ...
});
clientReq.setTimeout(1000, function () {
    clientReq.connection.destroy();
    ...
});

causes

TypeError: Cannot call method 'emit' of null
   at Socket.<anonymous> (http.js:1163:11)
   at Socket.emit (events.js:67:17)
   at Array.1 (net.js:301:14)
   at EventEmitter._tickCallback (node.js:192:40)

This is a regression in v0.6.17. This does not happen in v0.6.16.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions