You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: fix daemon.lock race on mutagen startup (#101)
I found the source of the issue where mutagen would fail to acquire the lock on `daemon.lock` at startup.
The MutagenClient attempts to lock the `daemon.lock` file while it is starting, so that it can fail fast if the daemon is not running.
While well meaning, this creates a race condition because as soon as we start the daemon process we create a MutagenClient so that we can talk to the daemon over its API. The MutagenClient might be holding the lock or have the lockfile open at the exact moment the daemon itself attempts to acquire and lock the file. The daemon immediately exits in that case and doesn't retry locking the file.
I've just removed the preflight checks on the `daemon.lock`, since we don't want Coder Desktop to ever mess with that file (outside of tests).
0 commit comments