mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-10 10:52:53 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user