mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-07 18:30:25 +08:00
设置客户端连接linger为0
This commit is contained in:
@@ -20,7 +20,7 @@ func (this *HTTPRequest) doWAFRequest() (blocked bool) {
|
||||
// 当前连接是否已关闭
|
||||
var conn = this.RawReq.Context().Value(HTTPConnContextKey)
|
||||
if conn != nil {
|
||||
trafficConn, ok := conn.(*TrafficConn)
|
||||
trafficConn, ok := conn.(*ClientConn)
|
||||
if ok && trafficConn.IsClosed() {
|
||||
this.disableLog = true
|
||||
return true
|
||||
@@ -32,7 +32,7 @@ func (this *HTTPRequest) doWAFRequest() (blocked bool) {
|
||||
this.disableLog = true
|
||||
|
||||
if conn != nil {
|
||||
trafficConn, ok := conn.(*TrafficConn)
|
||||
trafficConn, ok := conn.(*ClientConn)
|
||||
if ok && !trafficConn.IsClosed() {
|
||||
_ = trafficConn.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user