From 26bf4480ff5b6f72b40997618d4020127eb5b0ba Mon Sep 17 00:00:00 2001 From: Andrew Johnston Date: Tue, 9 Jul 2024 20:30:22 -0700 Subject: fix(net): set correct max size for Datagram (#21611) --- ext/net/01_net.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/net/01_net.js') diff --git a/ext/net/01_net.js b/ext/net/01_net.js index 0b0dec4d1..517ab127e 100644 --- a/ext/net/01_net.js +++ b/ext/net/01_net.js @@ -28,6 +28,8 @@ import { op_set_keepalive, op_set_nodelay, } from "ext:core/ops"; +const UDP_DGRAM_MAXSIZE = 65507; + const { Error, Number, @@ -378,7 +380,7 @@ class DatagramConn { #unref = false; #promise = null; - constructor(rid, addr, bufSize = 1024) { + constructor(rid, addr, bufSize = UDP_DGRAM_MAXSIZE) { this.#rid = rid; this.#addr = addr; this.bufSize = bufSize; -- cgit v1.2.3