Correctness: Accept loop discards per-connection errors silently #118

Open
opened 2026-05-11 23:08:58 +00:00 by thabeta · 0 comments
Owner

Severity: Medium

Location

crates/hero_aibroker_server/src/main.rsaccept_loop() and tcp_accept_loop()

Finding

Both accept loops discard per-connection errors:

tokio::spawn(async move {
    // ...
    let _ = hyper::server::conn::http1::Builder::new()
        .serve_connection(io, hyper_svc)
        .await;  // ERRORS SILENTLY DISCARDED
});

Impact

  • Connection failures are never logged
  • Cannot debug client-side issues
  • Cannot detect protocol violations
  • No visibility into connection-level errors

Recommendation

  • Log connection errors at debug level
  • Track connection error metrics
  • Alert on patterns of connection failures
## Severity: Medium ## Location `crates/hero_aibroker_server/src/main.rs` — `accept_loop()` and `tcp_accept_loop()` ## Finding Both accept loops discard per-connection errors: ```rust tokio::spawn(async move { // ... let _ = hyper::server::conn::http1::Builder::new() .serve_connection(io, hyper_svc) .await; // ERRORS SILENTLY DISCARDED }); ``` ## Impact - Connection failures are never logged - Cannot debug client-side issues - Cannot detect protocol violations - No visibility into connection-level errors ## Recommendation - Log connection errors at debug level - Track connection error metrics - Alert on patterns of connection failures
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
lhumina_code/hero_aibroker#118
No description provided.