mirror of
https://github.com/eolinker/apinto
synced 2025-10-24 17:20:22 +08:00
修复finshbug
This commit is contained in:
@@ -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()
|
||||
|
||||
}
|
||||
|
||||
@@ -265,9 +265,9 @@ func (ctx *HttpContext) FastFinish() {
|
||||
ctx.upstreamHostHandler = nil
|
||||
ctx.finishHandler = nil
|
||||
ctx.completeHandler = nil
|
||||
fasthttp.ReleaseRequest(ctx.requestReader.req)
|
||||
|
||||
ctx.requestReader.Finish()
|
||||
fasthttp.ReleaseRequest(ctx.requestReader.req)
|
||||
ctx.proxyRequest.Finish()
|
||||
ctx.response.Finish()
|
||||
ctx.fastHttpRequestCtx = nil
|
||||
|
||||
Reference in New Issue
Block a user