mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
fix(fuse,cli): bound the stop's wait for busy threads (B165)
A stop joined every background thread for as long as each took. The sync engine's mirror pass calls Drive with no deadline, and a stop that waited for it was killed by systemd at TimeoutStopSec. The stop now waits up to 10 s for the background threads and FUSE workers together, names any still running, and the runtime shuts down within 2 s.
This commit is contained in:
1 parent
ce2bc0ac84
commit
573a29e596
5 files changed
+94
-12
No files matched your search
@@ -2090,6 +2090,9 @@ fn mount_once(mountpoint: Option<PathBuf>) -> Result<pdfs_fuse::MountOutcome> {
|
||||
if let Err(e) = rt.block_on(auth::persist(&session)) {
|
||||
tracing::debug!(error = %e, "no new tokens to persist on shutdown");
|
||||
}
|
||||
// Dropping the runtime waits for every blocking task, however long; a call
|
||||
// still stuck on Drive would hold the stop until systemd kills it (B165).
|
||||
rt.shutdown_timeout(std::time::Duration::from_secs(2));
|
||||
|
||||
let outcome = result.context("mount failed")?;
|
||||
Ok(outcome)
|
||||
|
||||
Reference in new issue
Block a user