Commit 10ea372
authored
fix(shared/http): close idle connections to stop updater connection leak (#2648)
Each Download call built a fresh http.Transport whose pool was discarded
on return, so net/http returned the keep-alive connection to a pool that
nothing ever reclaimed. The updater polls the dependencies endpoint every
5 minutes, leaking one idle connection per poll until endpoints accumulated
thousands of ESTABLISHED sockets. DownloadAndVerify doubles the leak
(two downloads per call).
Close idle connections explicitly on return (DisableCompression already set
to match the per-call transport). Same fix as the v11 backport.1 parent 24de4f2 commit 10ea372
1 file changed
Lines changed: 3 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
0 commit comments