提交 f9a0d891 编写于 作者: F fatedier

pool: fix panic caused by sending to closed channel, fix #237

上级 92daa45b
......@@ -445,6 +445,12 @@ func (p *ProxyServer) getWorkConn() (workConn *conn.Conn, err error) {
}
func (p *ProxyServer) connectionPoolManager(closeCh <-chan struct{}) {
defer func() {
if r := recover(); r != nil {
log.Warn("ProxyName [%s], connectionPoolManager panic %v", p.Name, r)
}
}()
for {
// check if we need more work connections and send messages to frpc to get more
time.Sleep(time.Duration(2) * time.Second)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册