Unverified Commit 48717795 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

http: set socket.server unconditionally

This is useful for situations in which the socket was not
created for HTTP, e.g. when using arbitrary `Duplex` streams.

(The added test fails because previously, `socket.server.emit()`
would not work for emitting the `clientError` event, as
`socket.server` was `undefined`.)

PR-URL: https://github.com/nodejs/node/pull/30571


Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent a7d031bf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment