mirror of
https://github.com/fatedier/frp.git
synced 2026-03-21 16:53:47 +08:00
refactor: fix modernize lint issues (#5215)
This commit is contained in:
@@ -158,10 +158,7 @@ type Control struct {
|
||||
}
|
||||
|
||||
func NewControl(ctx context.Context, sessionCtx *SessionContext) (*Control, error) {
|
||||
poolCount := sessionCtx.LoginMsg.PoolCount
|
||||
if poolCount > int(sessionCtx.ServerCfg.Transport.MaxPoolCount) {
|
||||
poolCount = int(sessionCtx.ServerCfg.Transport.MaxPoolCount)
|
||||
}
|
||||
poolCount := min(sessionCtx.LoginMsg.PoolCount, int(sessionCtx.ServerCfg.Transport.MaxPoolCount))
|
||||
ctl := &Control{
|
||||
sessionCtx: sessionCtx,
|
||||
workConnCh: make(chan net.Conn, poolCount+10),
|
||||
|
||||
Reference in New Issue
Block a user