()
| 62 | let streamId = 1; |
| 63 | |
| 64 | function writeRequests() { |
| 65 | for (let i = 1; i < 10 && !gotError; i++) { |
| 66 | h2header[3] = 1; // HEADERS |
| 67 | h2header[4] = 0x5; // END_HEADERS|END_STREAM |
| 68 | h2header.writeIntBE(1, 0, 3); // Length: 1 |
| 69 | h2header.writeIntBE(streamId, 5, 4); // Stream ID |
| 70 | streamId += 2; |
| 71 | // 0x88 = :status: 200 |
| 72 | if (!conn.write(Buffer.concat([h2header, Buffer.from([0x88])]))) { |
| 73 | break; |
| 74 | } |
| 75 | } |
| 76 | if (!gotError) |
| 77 | setImmediate(writeRequests); |
| 78 | } |
| 79 | |
| 80 | conn.once('error', common.mustCall(() => { |
| 81 | gotError = true; |
no test coverage detected
searching dependent graphs…