Commit 61a05ff
committed
fix: Replace unreachable return in AsyncLockProvider with throw
The `return true` at the end of TryExecuteAsync was unreachable — the
loop only exits when validLock is true, which always returns from
inside the loop. If control ever did reach it (e.g. due to a future
code change), the caller would incorrectly think the lock succeeded
and the callback ran. Replace with throw InvalidOperationException.1 parent b84937d commit 61a05ff
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
0 commit comments