Bug description
The EspWebSocketClientConfig struct exposes reconnect_timeout_ms and network_timeout_ms as public fields, but the TryFrom implementation that converts the config to esp_websocket_client_config_t never assigns them to the C struct. They fall through to ..Default::default(), which zeroes them out, causing the C library to silently fall back to its 10-second defaults regardless of what the user sets.
- Would you like to work on a fix? [y/n]
Yes, absolutely
To Reproduce
let config = EspWebSocketClientConfig {
reconnect_timeout_ms: Duration::from_secs(5),
network_timeout_ms: Duration::from_secs(30),
..Default::default()
};
// Both values are silently ignored - the C library always uses its 10s defaults
let client = EspWebSocketClient::new(url, &config, timeout, callback)?;
Expected behavior
The client should use the values passed in by the user.
Environment
- Crate (
esp-idf-svc) version: 0.51.0
- ESP-IDF branch or tag: v5.4
- Target device (MCU): esp32c6
- OS: Linux (openSUSE Tumbleweed)
Bug description
The
EspWebSocketClientConfigstruct exposesreconnect_timeout_msandnetwork_timeout_msas public fields, but theTryFromimplementation that converts the config toesp_websocket_client_config_tnever assigns them to the C struct. They fall through to..Default::default(), which zeroes them out, causing the C library to silently fall back to its 10-second defaults regardless of what the user sets.Yes, absolutely
To Reproduce
Expected behavior
The client should use the values passed in by the user.
Environment
esp-idf-svc) version: 0.51.0