Cope with Packet::Nop

This commit is contained in:
Tony Garnock-Jones 2024-05-19 21:51:18 +02:00
parent 3141582223
commit df692507d9
2 changed files with 3 additions and 1 deletions

View File

@ -239,6 +239,9 @@ export abstract class LayerBoundary implements ProxyOutbound, ProxyInbound {
case 'Extension':
// Ignore unknown extensions.
break;
case 'Nop':
// Ignore no-ops.
break;
}
}
}

View File

@ -79,7 +79,6 @@ export class Relay extends LayerBoundary {
while (true) {
const rawPacket = this.decoder.try_next();
if (rawPacket === void 0) break;
if (rawPacket === false) continue;
const wirePacket = IO.toPacket(rawPacket);
if (wirePacket === void 0) throw new Error("Bad IO.Packet");
if (this.debug) console.log('IN', stringify(rawPacket));