Commit 24979f9
refactor(restart): always race for early recovery during cooldown
Remove the cooldownMs > pingIntervalMs guard. The withTimeoutOrNull block
already handles both cases correctly — it expires after cooldownMs when no
recovery is detected, and exits early if pings succeed. This enables early
recovery detection even when cooldown <= pingInterval, at zero extra cost.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 69e109e commit 24979f9
1 file changed
Lines changed: 24 additions & 29 deletions
File tree
- app/src/main/java/com/zaneschepke/wireguardautotunnel/core/tunnel/handler
Lines changed: 24 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
295 | 293 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
311 | 306 | | |
312 | 307 | | |
313 | 308 | | |
| |||
0 commit comments