fix: use-after-free in tcp_conn_destroy + throttle consumer_ack

tcp_conn_destroy: set read/write queue callbacks to NULL before
queue_free to stop deferred autofetch (drain_cb on freed rc).

write_on_get_cb: throttle consumer_ack to every 8th write_queue
dequeue instead of every single one (was 30+ ACK/sec).

ack_batch field in tcp_proxy_server_conn.
This commit is contained in:
Evgeny committed 2026-06-03 22:47:23 +03:00
1 parent 0449a5fd9d
commit d784b2bfbe
3 files changed
+11 -4

No files matched your search

+1
View File
@@ -36,6 +36,7 @@ struct tcp_proxy_server_conn {
void* close_timer; // таймер повтора CLOSE/ERROR
int close_backoff; // backoff: 50..5000 tb (5ms..500ms)
void* diag_timer; // 1-секундный таймер диагностики
uint8_t ack_batch; // счётчик для throttled consumer_ack (каждые 8 записей)
struct queue_waiter_handle pause_waiter;
struct UASYNC* ua;