diff --git a/network-poc/hub/src/main.rs b/network-poc/hub/src/main.rs index d733306..81f5193 100644 --- a/network-poc/hub/src/main.rs +++ b/network-poc/hub/src/main.rs @@ -486,15 +486,15 @@ async fn ws_handler( .and_then(|s| s.trim().parse::().ok()) .unwrap_or_else(|| addr.ip()); - // Max 2 yhteyttä per IP (dashboard-UI + selainsolmu) + // Max yhteyttä per IP: jokainen selain tarvitsee 2 (UI + coder-node) { let conns = state.ip_connections.lock().unwrap(); let count = conns.get(&ip).copied().unwrap_or(0); - if count >= 4 { - tracing::warn!("IP {} ylitti yhteysrajan ({}/4) — estetty", ip, count); + if count >= 10 { + tracing::warn!("IP {} ylitti yhteysrajan ({}/10) — estetty", ip, count); return ( axum::http::StatusCode::TOO_MANY_REQUESTS, - "Max 4 yhteyttä per IP", + "Max 10 yhteyttä per IP", ).into_response(); } }