http: set socket.server unconditionally · nodejs/node@6b380cc · GitHub
Skip to content

Commit 6b380cc

Browse files
addaleaxMylesBorins
authored andcommitted
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: #30571 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 7589486 commit 6b380cc

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

lib/_http_server.js

Lines changed: 1 addition & 2 deletions

test/parallel/test-http-generic-streams.js

Lines changed: 14 additions & 0 deletions

0 commit comments

Comments
 (0)