Skip to content

Commit 15ab882

Browse files
committed
tests: added tests for tolerating corrupt packet data
* Related #4 [ci skip]
1 parent 80180ec commit 15ab882

File tree

2 files changed

+382
-19
lines changed

2 files changed

+382
-19
lines changed

src/QUICServer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,11 @@ class QUICServer extends EventTarget {
373373
while (!established && !timedOut) {
374374
const message = new ArrayBuffer(32);
375375
await this.crypto.ops.randomBytes(message);
376-
await this.socket.send(Buffer.from(message), remoteInfo.port, remoteInfo.host);
376+
await this.socket.send(
377+
Buffer.from(message),
378+
remoteInfo.port,
379+
remoteInfo.host,
380+
);
377381
sleepProm = promise<void>();
378382
delayTimer = setTimeout(() => sleepProm!.resolveP(), delay);
379383
delay *= 2;

0 commit comments

Comments
 (0)