[A·M2 follow-up] Idle timeout + connection cap on emulators #21

Closed
opened 2026-06-25 03:07:54 +00:00 by vxfemboy · 0 comments
vxfemboy commented 2026-06-25 03:07:54 +00:00 (Migrated from github.com)

From the M2 review. HttpEmulator::handle reads with no timeout, so a client that connects and never sends the header terminator parks a task+FD indefinitely; per-conn tasks are also unbounded in count. Wrap each emulator handle in tokio::time::timeout and add a bounded semaphore in serve to prevent task/FD exhaustion. (Tarpit delays remain intentional.)

From the M2 review. `HttpEmulator::handle` reads with no timeout, so a client that connects and never sends the header terminator parks a task+FD indefinitely; per-conn tasks are also unbounded in count. Wrap each emulator `handle` in `tokio::time::timeout` and add a bounded semaphore in `serve` to prevent task/FD exhaustion. (Tarpit delays remain intentional.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/blackwall#21
No description provided.