docs(player): explain set_stream_error(false) message swallow
Clearing the error flag also drops any pending stream_error_message. A fast record_stream_error -> set_stream_error(false) -> polling-tick sequence will silently swallow the toast — that is the intent (a recovered error is not user-actionable), but it surprises future readers, so document it inline.
This commit is contained in:
1 file changed
+7
@@ -956,6 +956,13 @@ impl SharedState {
|
||||
}
|
||||
}
|
||||
|
||||
/// Clearing (`error = false`) also drops any pending
|
||||
/// `stream_error_message`. This is intentional: if init recovers before
|
||||
/// the Tauri polling loop drains the message, we'd rather swallow the
|
||||
/// toast than surface a notification for a transient failure the user
|
||||
/// never perceived. The trade-off is that a fast record→clear→drain
|
||||
/// sequence loses the message — accepted because a recovered error is
|
||||
/// not a user-actionable event.
|
||||
pub fn set_stream_error(&self, error: bool) {
|
||||
self.stream_error.store(error, Ordering::SeqCst);
|
||||
if !error {
|
||||
|
||||
Reference in new issue
Block a user