Skip to content

http server upgrade event #23857

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);
...
});

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

    httpIssues and 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