agama/rust/agama-lib/Cargo.toml
Imobach González Sosa 8c241e0e53
Detect broken WebSocket connections using TCP keepalive
The WebSocketClient.receive() method would hang indefinitely if the TCP
connection broke silently (network partition, server crash). This was
because TCP's default keepalive timeout is very long (often 2 hours).

This commit enables TCP keepalive with aggressive timings (30s initial
probe, 10s retry interval) to detect broken connections within 30-40
seconds instead of waiting forever.

Additionally, improve the receive() method to properly handle all
WebSocket message types (Text, Binary, Ping/Pong, Close, Frame) and
filter out control frames that are automatically handled by tungstenite.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-18 12:03:36 +01:00

46 lines
1.4 KiB
TOML

[package]
name = "agama-lib"
version = "1.0.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0"
agama-utils = { path = "../agama-utils" }
agama-transfer = { path = "../agama-transfer" }
jsonschema = { version = "0.30.0", default-features = false, features = [
"resolve-file",
] }
log = "0.4"
reqwest = { version = "0.12.8", default-features = false, features = ["json", "native-tls"] }
serde = { version = "1.0.210", features = ["derive"] }
serde_json = { version = "1.0.128", features = ["raw_value"] }
tempfile = "3.13.0"
thiserror = "2.0.12"
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
tokio-stream = "0.1.16"
tracing = "0.1.44"
url = { version = "2.5.2", features = ["serde"] }
schemars = { version = "1.2.1", features = ["url2"] }
zbus = { version = "5", default-features = false, features = ["tokio"] }
jsonwebtoken = "9.3.0"
chrono = { version = "0.4.38", default-features = false, features = [
"now",
"std",
"alloc",
"clock",
] }
home = "0.5.9"
fs_extra = "1.3.0"
fluent-uri = { version = "0.4.1", features = ["serde"] }
tokio-tungstenite = { version = "0.29.0", features = ["native-tls"] }
tokio-native-tls = "0.3.1"
socket2 = "0.6"
percent-encoding = "2.3.1"
uuid = { version = "1.17.0", features = ["serde", "v4"] }
zypp-agama = { path = "../zypp-agama" }
[dev-dependencies]
httpmock = "0.8.3"
env_logger = "0.11.5"