()
| 622 | |
| 623 | let total = 2; |
| 624 | const createConnection = function () { |
| 625 | |
| 626 | const client = Net.connect(server.info.port, () => { |
| 627 | |
| 628 | client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n'); |
| 629 | client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n'); |
| 630 | }); |
| 631 | |
| 632 | client.on('data', () => { |
| 633 | |
| 634 | --total; |
| 635 | client.destroy(); |
| 636 | }); |
| 637 | }; |
| 638 | |
| 639 | await new Promise((resolve) => { |
| 640 |