mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
The mount only ever went from offline to online: nothing marked it offline again, so after the Wi-Fi dropped every create, mkdir, delete and rename called Drive, waited out the SDK's retries for up to two minutes and answered EIO. Background loops kept polling the dead link. Connectivity now lives in pdfs-fuse's new link module and goes both ways. A call that gets no answer (a transport error or a request timeout) marks the mount offline; a probe thread checks every 2 s, backing off to 30 s, and on recovery re-lists folders served from the database, retries failed operations and wakes the drain. Interactive calls get a 20 s deadline, so a dead link costs one slow call instead of many. While offline: - create, mkdir, unlink, rmdir and rename fall back to the offline queue instead of answering EIO; - folders list from the database even when not marked listed, and are re-listed once the link returns; - reads of uncached data wait up to 30 s for the link, then retry once within the 120 s read deadline; - statfs serves the last quota instead of fetching, and quota refreshes are single-flight; - the event and photo event loops wait for the link instead of polling. A create whose request timed out may have landed anyway. When the drain replays it and finds a same-named twin of the same kind, created within the last two minutes and still empty, it adopts that node instead of making a conflict copy. The drain also leaves alone a name still held by a queued trash.