summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-06-18 22:35:55 +0700
committerShulhan <ms@kilabit.info>2023-06-18 22:35:55 +0700
commitde4731319a94423a35fc13be4e51ad7236840d89 (patch)
tree1cd320e2e7f1cd220e4a16aa7d21593a2f10111e
parentb63f47b36bdac0346a7c862715c6975fd7926f49 (diff)
downloadpakakeh.go-de4731319a94423a35fc13be4e51ad7236840d89.tar.xz
lib/websocket: revert maxBuffer back to 1024
In 25d09e2625f we increase the maxBuffer to 4096 to try increasing the performance when handling large payload. Turns out increasing this make the server cannot handle larger payload.
-rw-r--r--lib/websocket/funcs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/websocket/funcs.go b/lib/websocket/funcs.go
index aec7118b..804bdbf0 100644
--- a/lib/websocket/funcs.go
+++ b/lib/websocket/funcs.go
@@ -16,7 +16,8 @@ import (
// maxBuffer define maximum payload that we read/write from socket at one
// time.
-const maxBuffer = 4096
+// This number should be lower than MTU for better handling larger payload.
+const maxBuffer = 1024
// Recv read all content from file descriptor into slice of bytes.
//