fix: Close protocol response streams when aborted (#24014)
This commit is contained in:
parent
bcba4baa85
commit
509740c357
2 changed files with 30 additions and 0 deletions
|
@ -42,6 +42,12 @@ NodeStreamLoader::~NodeStreamLoader() {
|
|||
node::MakeCallback(isolate_, emitter_.Get(isolate_), "removeListener",
|
||||
node::arraysize(args), args, {0, 0});
|
||||
}
|
||||
|
||||
// Destroy the stream if not already ended
|
||||
if (!ended_) {
|
||||
node::MakeCallback(isolate_, emitter_.Get(isolate_), "destroy", 0, nullptr,
|
||||
{0, 0});
|
||||
}
|
||||
}
|
||||
|
||||
void NodeStreamLoader::Start(network::mojom::URLResponseHeadPtr head) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue