Commit 71b1912
committed
fix: preserve sync:stop event emission for noWatch mode
Address review feedback from @zerbitx: the initial fix disabled
RestartOnError for noWatch which also prevented sync:stop from being
emitted. Add an else branch that registers a lighter goroutine for
noWatch mode that:
- Emits the sync:stop hook when context is cancelled or sync completes
- Does NOT call parent.Kill(nil) (to avoid breaking SSH injection)
This preserves the sync:stop lifecycle event while still fixing the
original bug where context cancellation killed the parent tomb.1 parent dbf7b52 commit 71b1912
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
229 | 244 | | |
230 | 245 | | |
231 | 246 | | |
| |||
0 commit comments