Skip to content

Commit eee587b

Browse files
addaleaxMylesBorins
authored andcommitted
test: fix test-http2-reset-flood flakiness
Refs: #29802 (comment) PR-URL: #32607 Reviewed-By: Anna Henningsen <[email protected]>
1 parent a83fc49 commit eee587b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎test/parallel/test-http2-reset-flood.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ const worker = new Worker(__filename).on('message', common.mustCall((port) =>{
6969
h2header.writeIntBE(streamId,5,4);// Stream ID
7070
streamId+=2;
7171
// 0x88 = :status: 200
72-
conn.write(Buffer.concat([h2header,Buffer.from([0x88])]));
72+
if(conn.writable)
73+
conn.write(Buffer.concat([h2header,Buffer.from([0x88])]));
7374
}
74-
if(!gotError)
75+
if(conn.writable&&!gotError)
7576
setImmediate(writeRequests);
7677
}
7778

0 commit comments

Comments
(0)