Commit 6a34c2a
Fix Friend.Sync deadlock via consistent lock ordering
Friend.Sync() locked source then target. If two users interacted
simultaneously with swapped source/target, ABBA deadlock occurred.
Fix by always locking the object with the lower identity hash first.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b0635c9 commit 6a34c2a
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| |||
0 commit comments