diff options
author | Andrew Johnston <apjohnsto@gmail.com> | 2024-07-09 20:30:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 03:30:22 +0000 |
commit | 26bf4480ff5b6f72b40997618d4020127eb5b0ba (patch) | |
tree | 1f18679954c7d7f9389b0760f73ada7c913fd871 /ext/net/01_net.js | |
parent | ce7dc2be92499f15b4b0315bfca3ee9d61fc3c5e (diff) |
fix(net): set correct max size for Datagram (#21611)
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r-- | ext/net/01_net.js | 4 |
1 files changed, 3 insertions, 1 deletions
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; |