Commit d888a81
Fix deadlock when UDP port is already in use (#58)
* Fix deadlock when UDP port 7734 is already in use
When listenUDP failed silently and FSWatch was disabled, the Run() select
loop had no way to receive events — causing a deadlock panic on kill or
hanging forever. Now listenUDP signals startup success/failure via a
buffered channel; if the port is already bound (watch already running),
we return a clear error immediately instead of hanging.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Distinguish EADDRINUSE from other UDP bind errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1ca605e commit d888a81
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
| |||
525 | 537 | | |
526 | 538 | | |
527 | 539 | | |
528 | | - | |
| 540 | + | |
529 | 541 | | |
530 | 542 | | |
531 | 543 | | |
532 | | - | |
| 544 | + | |
533 | 545 | | |
534 | 546 | | |
535 | 547 | | |
| 548 | + | |
536 | 549 | | |
537 | 550 | | |
538 | 551 | | |
| |||
0 commit comments