Skip to content

Commit e6288b1

Browse files
committed
there was still the cases where panics occur
1 parent 7731c8d commit e6288b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

livekit-protocol/src/promise.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ impl<T: Clone> Promise<T> {
5555
}
5656

5757
pub fn try_result(&self) -> Option<T> {
58-
self.result.try_read().unwrap().clone()
58+
self.result.try_read().ok().and_then(|result| result.clone())
5959
}
6060
}

0 commit comments

Comments
 (0)