File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,9 +219,13 @@ impl Stream {
219219 let error_callback_clone = error_callback. clone ( ) ;
220220 std:: thread:: spawn ( move || {
221221 if let Err ( e) = block_on ( stream_clone. play_all ( ) ) {
222- error_callback_clone. lock ( ) . unwrap ( ) ( StreamError :: from ( BackendSpecificError {
223- description : e. to_string ( ) ,
224- } ) ) ;
222+ error_callback_clone
223+ . lock ( )
224+ . unwrap_or_else ( |e| e. into_inner ( ) ) ( StreamError :: from (
225+ BackendSpecificError {
226+ description : e. to_string ( ) ,
227+ } ,
228+ ) ) ;
225229 }
226230 } ) ;
227231
@@ -239,9 +243,11 @@ impl Stream {
239243 let timing_info = match block_on ( stream_clone. timing_info ( ) ) {
240244 Ok ( timing_info) => timing_info,
241245 Err ( e) => {
242- error_callback. lock ( ) . unwrap ( ) ( StreamError :: from ( BackendSpecificError {
243- description : e. to_string ( ) ,
244- } ) ) ;
246+ error_callback. lock ( ) . unwrap_or_else ( |e| e. into_inner ( ) ) ( StreamError :: from (
247+ BackendSpecificError {
248+ description : e. to_string ( ) ,
249+ } ,
250+ ) ) ;
245251 break ;
246252 }
247253 } ;
You can’t perform that action at this time.
0 commit comments