diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2024-09-05 13:30:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 13:30:18 +0900 |
commit | 186f7484da3116aeda474f7f529d417ee542b450 (patch) | |
tree | 953c80f14d9d1ee0daa3ef3f968b76ecbe0cd8dd /runtime/js | |
parent | dd208a6df02e99dbd7e1cb7b197fde8ccfeb0f88 (diff) |
fix(ext/node): close upgraded socket when the underlying http connection is closed (#25387)
This change fixes the handling of upgraded socket from `node:http` module.
In `op_node_http_fetch_response_upgrade`, we create DuplexStream paired
with `hyper::upgrade::Upgraded`. When the connection is closed from the
server, the read result from `Upgraded` becomes 0. However because we
don't close the paired DuplexStream at that point, the Socket object in
JS side keeps alive even after the server closed. That caused the issue
#20179
This change fixes it by closing the paired DuplexStream when the
`Upgraded` stream returns 0 read result.
closes #20179
Diffstat (limited to 'runtime/js')
0 files changed, 0 insertions, 0 deletions