Driver: Fix scheduler crash after task closure

A removed audio task could still have one or more driver messages left in its queue, leading to a crash when the id->mixer lookup failed. This removes an unwrap which is invalid under these assumptions and includes an extra cleanup measure for message forwarders under the same circumstances.

This was tested using `cargo make ready`.
This commit is contained in:
Kyle Simpson
2023-06-07 21:15:30 +01:00
parent c976d50cc5
commit 77e3916bdc
4 changed files with 43 additions and 19 deletions

View File

@@ -13,7 +13,6 @@ use reqwest::{
header::{HeaderMap, ACCEPT_RANGES, CONTENT_LENGTH, CONTENT_TYPE, RANGE, RETRY_AFTER},
Client,
};
use std::fmt::format;
use std::{
io::{Error as IoError, ErrorKind as IoErrorKind, Result as IoResult, SeekFrom},
pin::Pin,