- Notifications
You must be signed in to change notification settings - Fork3
Commitcd845d4
authored
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).1 parent6b3851d commitcd845d4
File tree
2 files changed
+8
-20
lines changed- App/Services
- MutagenSdk
2 files changed
+8
-20
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
441 | 441 |
| |
442 | 442 |
| |
443 | 443 |
| |
| 444 | + | |
444 | 445 |
| |
445 | 446 |
| |
446 | 447 |
| |
| |||
479 | 480 |
| |
480 | 481 |
| |
481 | 482 |
| |
| 483 | + | |
482 | 484 |
| |
483 | 485 |
| |
484 | 486 |
| |
485 | 487 |
| |
486 | 488 |
| |
487 | 489 |
| |
| 490 | + | |
488 | 491 |
| |
489 | 492 |
| |
490 | 493 |
| |
| |||
496 | 499 |
| |
497 | 500 |
| |
498 | 501 |
| |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
499 | 506 |
| |
500 | 507 |
| |
501 | 508 |
| |
| |||
528 | 535 |
| |
529 | 536 |
| |
530 | 537 |
| |
| 538 | + | |
531 | 539 |
| |
532 | 540 |
| |
533 | 541 |
| |
|
Lines changed: 0 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 | 19 |
| |
40 | 20 |
| |
41 | 21 |
| |
|
0 commit comments
Comments
(0)