优化代码

This commit is contained in:
刘祥超
2022-12-27 18:58:29 +08:00
parent 47818f972e
commit c4bac7f43c
2 changed files with 7 additions and 1 deletions

View File

@@ -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
}

View File

@@ -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
}