Enhance TCP timeout configuration for companions

- Added `tcp_timeout` setting to `config.yaml.example` for companion configurations, allowing customization of TCP connection timeouts.
- Updated `RepeaterDaemon` to retrieve and apply the `tcp_timeout` setting, with a default value of 120 seconds.
- Modified `CompanionFrameServer` to accept `client_idle_timeout_sec` parameter, ensuring proper handling of idle timeouts.
- Enhanced API endpoints to include `tcp_timeout` in companion settings, improving configuration visibility and management.
This commit is contained in:
agessaman
2026-03-07 20:39:37 -08:00
parent 1b6f9df489
commit 062dabc46e
4 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -2411,6 +2411,8 @@ class APIEndpoints:
"tcp_port": settings.get("tcp_port", 5000),
"bind_address": settings.get("bind_address", "0.0.0.0"),
}
if "tcp_timeout" in settings:
comp_settings["tcp_timeout"] = settings["tcp_timeout"]
new_identity = {
"name": name,
"identity_key": identity_key,
@@ -2609,7 +2611,7 @@ class APIEndpoints:
identity["settings"] = {}
# Only allow companion settings
for k, v in data["settings"].items():
if k in ("node_name", "tcp_port", "bind_address"):
if k in ("node_name", "tcp_port", "bind_address", "tcp_timeout"):
identity["settings"][k] = v
companions[identity_index] = identity