mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-16 07:46:36 +08:00
优化代码
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/waf"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -112,6 +113,11 @@ func (this *ClientConn) Read(b []byte) (n int, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭连接
|
||||
if err == io.EOF {
|
||||
_ = this.rawConn.Close()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ func (this *Manager) Start() {
|
||||
}
|
||||
|
||||
// 定时获取
|
||||
var duration = 30 * time.Second
|
||||
var duration = 30 * time.Minute
|
||||
if Tea.IsTesting() {
|
||||
duration = 30 * time.Second
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user