diff --git a/src/core.ts b/src/core.ts index afa103a..43d61f7 100644 --- a/src/core.ts +++ b/src/core.ts @@ -288,7 +288,7 @@ export class DnsCore { private onMessage: ListenerCallback = async (data: Buffer, sender: string, r) => { let max_size = 128 * 1024; let stream = true; - if (typeof r === "number") { + if (!r || typeof r === "number") { max_size = r; stream = false; }