-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
When I call Stream::connect() to connect to a known BLE device, if it is powered down, or absent, or connected to another computer/mobile, the attempt to connect never fails nor times out and my app is blocked waiting to connect
let ble_stream = utils::stream::build_ble_stream::<BleId>(
BleId::from_mac_address(&mac_address.to_string()).unwrap(),
Duration::from_secs(4),
)
.await?;
let stream_api = StreamApi::new();
let (packet_receiver, stream_api) = stream_api.connect(ble_stream).await;
Describe the solution you’d like
A configurable timeout period on the connect method, which returns Result, and a specific error returned to show the connection attempt timed out.
If you do not wish to modify signatures, then adding a try_connect() methods that can timeout would be fine.
Additional context
Any other relevant info.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request