From 8d16e539bb8e6a94b56ab893ff55e47b21194b7b Mon Sep 17 00:00:00 2001 From: Azreyo <58790873+Azreyo@users.noreply.github.com> Date: Sat, 20 Dec 2025 22:33:57 +0100 Subject: [PATCH] fix: Remove unnecessary max_frame_size calculation in websocket handling --- src/websocket.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/websocket.c b/src/websocket.c index 6a23972..3c12b44 100644 --- a/src/websocket.c +++ b/src/websocket.c @@ -287,12 +287,6 @@ int ws_send_frame(ws_connection_t* conn, uint8_t opcode, const uint8_t* payload, return -1; } - size_t max_frame_size = 10 + payload_len; - if (max_frame_size > 65536) - { - max_frame_size = 65536; - } - uint8_t buffer[65536]; // Limit payload to avoid overflow (65536 - 10 bytes for max header)