fix panic on windows if device gets unplugged
This commit is contained in:
parent
2220f58491
commit
3d163c3468
1 changed files with 2 additions and 2 deletions
|
|
@ -141,8 +141,8 @@ impl Stream {
|
|||
|
||||
#[inline]
|
||||
fn push_command(&self, command: Command) {
|
||||
// Safe to unwrap: sender outlives receiver.
|
||||
self.commands.send(command).unwrap();
|
||||
// Sender generally outlives receiver, unless the device gets unplugged.
|
||||
let _ = self.commands.send(command);
|
||||
unsafe {
|
||||
let result = synchapi::SetEvent(self.pending_scheduled_event);
|
||||
assert_ne!(result, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue