Skip to content

http server upgrade event #23857

Closed
Closed
@jordbaer

Description

@jordbaer
  • Version: 11.0.0, 10.0.0, and probably more
  • Platform: macos
  • Subsystem: http

http server upgrade event:

When the 'upgrade' event is emitted, the http server doesn't unregister the 'timeout' handler (function socketOnTimeout).

If a timeout event occurs later, the http server code will destroy the socket.

workaround:

server.on("upgrade", (req,socket,head) => {
socket.removeAllListeners("timeout");
socket.setTimeout(0);
...
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions