Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: increase WS send buffer from 4KB to 16KB

Chat messages with auth tokens exceed 4KB, causing JSON truncation
at position 4095. Server receives invalid JSON and rejects the message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+5 -5
+4 -4
fedac/native/src/ws-client.c
··· 297 297 // Check for pending send 298 298 pthread_mutex_lock(&ws->mu); 299 299 int do_send = ws->send_pending && ws->connected; 300 - char sbuf[4096]; 301 - if (do_send) { strncpy(sbuf, ws->send_buf, 4095); sbuf[4095]=0; ws->send_pending=0; } 300 + char sbuf[16384]; 301 + if (do_send) { strncpy(sbuf, ws->send_buf, 16383); sbuf[16383]=0; ws->send_pending=0; } 302 302 pthread_mutex_unlock(&ws->mu); 303 303 if (do_send) thread_send(ws, sbuf); 304 304 ··· 367 367 if (!ws) return; 368 368 pthread_mutex_lock(&ws->mu); 369 369 if (ws->connected) { 370 - strncpy(ws->send_buf, text, 4095); 371 - ws->send_buf[4095] = 0; 370 + strncpy(ws->send_buf, text, 16383); 371 + ws->send_buf[16383] = 0; 372 372 ws->send_pending = 1; 373 373 } 374 374 pthread_mutex_unlock(&ws->mu);
+1 -1
fedac/native/src/ws-client.h
··· 24 24 int error; // 1 = last connect failed 25 25 26 26 // outgoing send queue (written by main, drained by thread) 27 - char send_buf[4096]; 27 + char send_buf[16384]; 28 28 int send_pending; // 1 = send_buf has data to send 29 29 30 30 // inbound message queue (written by thread, consumed by main each frame)