mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
frpc: consider include configs for verify and reload command (#2424)
This commit is contained in:
@@ -248,12 +248,10 @@ func (ctl *Control) GetWorkConn() (workConn net.Conn, err error) {
|
||||
xl.Debug("get work connection from pool")
|
||||
default:
|
||||
// no work connections available in the poll, send message to frpc to get more
|
||||
err = errors.PanicToError(func() {
|
||||
if err = errors.PanicToError(func() {
|
||||
ctl.sendCh <- &msg.ReqWorkConn{}
|
||||
})
|
||||
if err != nil {
|
||||
xl.Error("%v", err)
|
||||
return
|
||||
}); err != nil {
|
||||
return nil, fmt.Errorf("control is already closed")
|
||||
}
|
||||
|
||||
select {
|
||||
@@ -357,15 +355,15 @@ func (ctl *Control) stoper() {
|
||||
|
||||
ctl.allShutdown.WaitStart()
|
||||
|
||||
ctl.conn.Close()
|
||||
ctl.readerShutdown.WaitDone()
|
||||
|
||||
close(ctl.readCh)
|
||||
ctl.managerShutdown.WaitDone()
|
||||
|
||||
close(ctl.sendCh)
|
||||
ctl.writerShutdown.WaitDone()
|
||||
|
||||
ctl.conn.Close()
|
||||
ctl.readerShutdown.WaitDone()
|
||||
|
||||
ctl.mu.Lock()
|
||||
defer ctl.mu.Unlock()
|
||||
|
||||
|
Reference in New Issue
Block a user