Skip to content

Commit

Permalink
Merge pull request #1414 from fatedier/new
Browse files Browse the repository at this point in the history
 let max_pool_count valid
  • Loading branch information
fatedier authored Aug 29, 2019
2 parents 234d634 + e9e86fc commit 94212ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions server/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 94212ac

Please sign in to comment.