From bd755242eca36c89fb43a53d60879da9b3474c90 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Fri, 23 Oct 2026 21:16:11 -0700 Subject: [PATCH] fix(daemon): stop calling a listener-less bind collision 'stale state' (refs #1700) Co-Authored-By: Claude --- crates/fbuild-daemon/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/fbuild-daemon/src/main.rs b/crates/fbuild-daemon/src/main.rs index 604121d1..b4e0fe61 100644 --- a/crates/fbuild-daemon/src/main.rs +++ b/crates/fbuild-daemon/src/main.rs @@ -791,7 +791,9 @@ async fn bind_listener_with_retry(addr: &str) -> tokio::net::TcpListener { } tracing::warn!( attempt, - "bind to {} failed ({}); no listener present (stale state), retrying in 500ms", + "bind to {} failed ({}); no listener present, so the port is held by \ + stale TIME_WAIT state or by another socket (e.g. an outgoing \ + connection's ephemeral port; FastLED/fbuild#1700), retrying in 500ms", addr, e ); @@ -805,7 +807,9 @@ async fn bind_listener_with_retry(addr: &str) -> tokio::net::TcpListener { } eprintln!( - "failed to bind to {} after 3 attempts: {}", + "failed to bind to {} after 3 attempts: {}; nothing is listening there, so \ + another socket (often an outgoing connection's ephemeral port) holds it; \ + set FBUILD_DAEMON_PORT to use a different port (FastLED/fbuild#1700)", addr, last_err .map(|e| e.to_string())