Skip to content

http.IncomingMessage doesn't fire callback on 'timeout' #33734

@bole1

Description

@bole1
  • Version:14.3.0
  • Platform:
  • Subsystem:

What steps will reproduce the bug?

Source code from lib/_http_incoming.js:

IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
  if (callback)
    this.on('timeout', callback);
  this.socket.setTimeout(msecs);
  return this;
};

IncomingMessage doesn't emit 'timeout' so callback will never be fired

How often does it reproduce? Is there a required condition?

What is the expected behavior?

IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
   this.socket.setTimeout(msecs,callback);
  return this;
};

EDIT(trivikr): put code in a code block

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.httpIssues or PRs related to the http subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions