mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #329] 源代码中看不到创建连接池 #243
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FunTCode on GitHub (May 22, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/329
connectionPoolManager函数里只看到往ctlMsgChan放入1,到看不到frps向frpc发送请求,代码如下:
// check if we need more work connections and send messages to frpc to get more
time.Sleep(time.Duration(2) * time.Second)
select {
// if the channel closed, it means the proxy is closed, so just return
case <-closeCh:
log.Info("ProxyName [%s], connectionPoolManager exit", p.Name)
return
default:
curWorkConnNum := int64(len(p.workConnChan))
diff := p.PoolCount - curWorkConnNum
if diff > 0 {
if diff < p.PoolCount/5 {
diff = p.PoolCount4/5 + 1
} else if diff < p.PoolCount/2 {
diff = p.PoolCount/4 + 1
} else if diff < p.PoolCount4/5 {
diff = p.PoolCount/5 + 1
} else {
diff = p.PoolCount/10 + 1
}
if diff+curWorkConnNum > p.PoolCount {
diff = p.PoolCount - curWorkConnNum
}
for i := 0; i < int(diff); i++ {
p.ctlMsgChan <- 1
}
@fatedier commented on GitHub (May 22, 2017):
代码交流可以加 qq群或者直接给我发邮件,不要建 issue。
这部分代码 v0.10.0 已经修改过了,被废弃了,发送流程在另外的协程里。
@FunTCode commented on GitHub (May 22, 2017):
好的,不好意思,.net程序员第一次用github,谢谢前辈指导。
@fatedier commented on GitHub (May 22, 2017):
没事,欢迎对于源码的交流和探讨,共同进步。
@FunTCode commented on GitHub (May 22, 2017):
能否提供一下qq群号码?我发现好多仿冒网站都不知哪个是官方
@fatedier commented on GitHub (May 22, 2017):
606194980