We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e46fe60 commit e29eb71Copy full SHA for e29eb71
input-capture/src/macos.rs
@@ -390,9 +390,9 @@ fn create_event_tap<'a>(
390
391
if let Some(pos) = pos {
392
res_events.iter().for_each(|e| {
393
- event_tx
394
- .blocking_send((pos, *e))
395
- .expect("Failed to send event");
+ // error must be ignored, since the event channel
+ // may already be closed when the InputCapture instance is dropped.
+ let _ = event_tx.blocking_send((pos, *e));
396
});
397
// Returning None should stop the event from being processed
398
// but core fundation still returns the event
0 commit comments