From 7d9ad57f52c9ac695feb0e06a6d6fb405e457538 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Mon, 3 Dec 2018 08:58:37 +0100 Subject: [PATCH] Fixing error --- src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }