From 58745992efe08c1720dcf9330c8c6ca15dd93fbe Mon Sep 17 00:00:00 2001 From: fatedier Date: Tue, 27 Aug 2019 11:17:43 +0800 Subject: [PATCH 1/2] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d616099..2e3dacd 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Now it also try to support p2p connect. frp is under development and you can try it with latest release version. Master branch for releasing stable version when dev branch for developing. -**We may change any protocol and can't promise backward compatible. Please check the release log when upgrading.** +**We may change any protocol and can't promise backward compatibility. Please check the release log when upgrading.** ## Architecture From e9e86fccf080f42d11261d48c66230e06944aeb0 Mon Sep 17 00:00:00 2001 From: fatedier Date: Thu, 29 Aug 2019 21:13:21 +0800 Subject: [PATCH 2/2] let max_pool_count valid --- server/control.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/control.go b/server/control.go index 4e13cf2..bb802a7 100644 --- a/server/control.go +++ b/server/control.go @@ -137,6 +137,10 @@ func NewControl(rc *controller.ResourceController, pxyManager *proxy.ProxyManage statsCollector stats.Collector, ctlConn net.Conn, loginMsg *msg.Login, serverCfg config.ServerCommonConf) *Control { + poolCount := loginMsg.PoolCount + if poolCount > int(serverCfg.MaxPoolCount) { + poolCount = int(serverCfg.MaxPoolCount) + } return &Control{ rc: rc, pxyManager: pxyManager, @@ -145,9 +149,9 @@ func NewControl(rc *controller.ResourceController, pxyManager *proxy.ProxyManage loginMsg: loginMsg, sendCh: make(chan msg.Message, 10), readCh: make(chan msg.Message, 10), - workConnCh: make(chan net.Conn, loginMsg.PoolCount+10), + workConnCh: make(chan net.Conn, poolCount+10), proxies: make(map[string]proxy.Proxy), - poolCount: loginMsg.PoolCount, + poolCount: poolCount, portsUsedNum: 0, lastPing: time.Now(), runId: loginMsg.RunId,