修复finshbug

This commit is contained in:
huangmengzhu
2023-03-10 21:14:26 +08:00
parent 1fa2b03f2c
commit fb273e009c
2 changed files with 5 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package http_context
import (
"context"
"fmt"
"github.com/valyala/fasthttp"
"net"
"time"
@@ -195,7 +196,9 @@ func (ctx *cloneContext) FastFinish() {
ctx.upstreamHostHandler = nil
ctx.finishHandler = nil
ctx.completeHandler = nil
fasthttp.ReleaseRequest(ctx.proxyRequest.req)
fasthttp.ReleaseResponse(ctx.response.Response)
ctx.response.Finish()
ctx.proxyRequest.Finish()
}