Currently, Endpoint::request (and similar) will never complete if the link between two nodes is broken in a way where Ergot cannot know about it.
Examples:
- Serial port where the wires are unplugged.
- A UDP connection where the destination stops listening.
Likely there are other examples.
It feels like need a per-interface timeout, so that errors can be returned to the application so it can decide wether to retry or not, since Ergot does not itself have any internal retry mechanisms.
Background:
I discovered this while writing client shutdown code which sends a message to a server, using UDP, if the server is stopped first the client hangs during shutdown. For reference, this is the exact block that does not complete:
let result = command_client
.request(&OperatorCommandRequest::CameraCommand(
camera_identifier,
CameraCommand::StopStreaming {
port_id,
},
))
.await;
Currently,
Endpoint::request(and similar) will never complete if the link between two nodes is broken in a way where Ergot cannot know about it.Examples:
Likely there are other examples.
It feels like need a per-interface timeout, so that errors can be returned to the application so it can decide wether to retry or not, since Ergot does not itself have any internal retry mechanisms.
Background:
I discovered this while writing client shutdown code which sends a message to a server, using UDP, if the server is stopped first the client hangs during shutdown. For reference, this is the exact block that does not complete: