Commit cc59b33
committed
fix: drain migration channel on early return to prevent goroutine leak
runMigrations returned on the first error without draining the ret
channel. The reader goroutine (read/readUp/readDown) blocked forever
on a send once the PrefetchMigrations buffer filled, leaking the
goroutine plus any open migration file handles or HTTP bodies.
Added a deferred drain loop so the channel is fully consumed on all
return paths.1 parent 504568a commit cc59b33
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
724 | 730 | | |
725 | 731 | | |
726 | 732 | | |
| |||
0 commit comments