Skip to content

Commit 53b692c

Browse files
kumapower17aldas
authored andcommitted
Ensure proxy connection is closed in proxyRaw function
(#2837)
1 parent e644ff8 commit 53b692c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

middleware/proxy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ func proxyRaw(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
158158
c.Set("_error", echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, dial error=%v, url=%s", err, t.URL)))
159159
return
160160
}
161+
defer out.Close()
161162

162163
// Write header
163164
err = r.Write(out)

0 commit comments

Comments
 (0)