fix(upstream-http): Properly close http body to fix goroutine leak.

This commit is contained in:
2026-07-13 16:49:20 +08:00
parent 1fe56435af
commit 3266983024
+2 -1
View File
@@ -134,7 +134,8 @@ func upstreamFiber(name string) {
continue
}
if r.StatusCode != 200 {
fmt.Fprintf(os.Stderr, "Request to %s for stream %s failed with status code %d\n", upstreams[name], name, err)
fmt.Fprintf(os.Stderr, "Request to %s for stream %s failed with status code %d\n", upstreams[name], name, r.StatusCode)
r.Body.Close()
time.Sleep(5 * time.Second)
continue
}