mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-29 03:30:24 +08:00
优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
|
||||
"github.com/pires/go-proxyproto"
|
||||
"net"
|
||||
@@ -33,7 +34,9 @@ func NewHTTPClientPool() *HTTPClientPool {
|
||||
clientsMap: map[string]*HTTPClient{},
|
||||
}
|
||||
|
||||
go pool.cleanClients()
|
||||
goman.New(func() {
|
||||
pool.cleanClients()
|
||||
})
|
||||
|
||||
return pool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user