mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
fix(appd): write actual bound WebSocket port to appd.wsport file
ws_listener.local_addr().port() is used instead of the configured ws_port value. This is correct when WEFT_APPD_WS_PORT=0 lets the OS assign an ephemeral port; the file reflects the real listening port.
This commit is contained in:
parent
5bd4857a67
commit
01a4969883
1 changed files with 3 additions and 2 deletions
|
|
@ -126,8 +126,9 @@ async fn run() -> anyhow::Result<()> {
|
|||
let ws_listener = tokio::net::TcpListener::bind(ws_addr)
|
||||
.await
|
||||
.with_context(|| format!("bind WebSocket {ws_addr}"))?;
|
||||
tracing::info!(addr = %ws_addr, "WebSocket listener ready");
|
||||
write_ws_port(ws_port)?;
|
||||
let ws_bound_port = ws_listener.local_addr()?.port();
|
||||
tracing::info!(port = ws_bound_port, "WebSocket listener ready");
|
||||
write_ws_port(ws_bound_port)?;
|
||||
|
||||
let _ = sd_notify::notify(false, &[sd_notify::NotifyState::Ready]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue