Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/parallel/test-http2-bidirectional-write-deadlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class StalledClientSocket extends Duplex {
super();
this.inner = net.connect(port, common.localhostIPv4);
this.inner.on('data', (chunk) => this.push(chunk));
this.inner.on('end', () => this.push(null));
}
_read() {
// Incoming data is pushed as it arrives.
Expand All @@ -54,7 +55,7 @@ class StalledClientSocket extends Duplex {
callback();
}
_final(callback) {
callback();
this.inner.end(callback);
}
_destroy(err, callback) {
this.inner.destroy();
Expand Down Expand Up @@ -101,7 +102,8 @@ server.listen(0, common.mustCall(() => {
stallWrites = false;
for (const callback of heldCallbacks) callback();

client.destroy();
req.end();
client.close();
server.close();
}));
}));
Loading