Commit f6cbf4e
committed
fix: guard procCache.runLoop against panic leaving goroutine state corrupted
If runLoop panicked before closing firstReadyCh, callers would block until
context timeout, and s.running would remain true blocking all future restarts.
Defer now unconditionally resets s.running=false and closes firstReadyCh when
the panic happens before the first result is emitted.1 parent 82f8234 commit f6cbf4e
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
94 | 108 | | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
98 | 112 | | |
99 | 113 | | |
100 | 114 | | |
101 | | - | |
102 | | - | |
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| |||
0 commit comments