mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-05 23:51:04 +03:00
drm: log why the uinput refresh worker could not start
The worker released its coalescing slot and returned silently when the runtime failed to build, leaving the uinput range stale for the new layout with nothing in the log to explain it.
This commit is contained in:
@@ -500,12 +500,21 @@ async fn recv_thread(
|
||||
UINPUT_REFRESH_GEN.fetch_add(1, Ordering::AcqRel);
|
||||
if !UINPUT_REFRESH_BUSY.swap(true, Ordering::AcqRel) {
|
||||
std::thread::spawn(|| {
|
||||
let Ok(rt) = tokio::runtime::Builder::new_current_thread()
|
||||
let rt = match tokio::runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
else {
|
||||
UINPUT_REFRESH_BUSY.store(false, Ordering::Release);
|
||||
return;
|
||||
{
|
||||
Ok(rt) => rt,
|
||||
Err(err) => {
|
||||
// Release the slot so a later topology change can retry, and say
|
||||
// why: silently skipping would leave the uinput range stale for
|
||||
// the new layout with nothing in the log to explain it.
|
||||
log::warn!(
|
||||
"drm: uinput refresh worker could not build a runtime: {err}"
|
||||
);
|
||||
UINPUT_REFRESH_BUSY.store(false, Ordering::Release);
|
||||
return;
|
||||
}
|
||||
};
|
||||
let mut served = 0u64;
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user