cmd/cli: do not run pre run on reload

This commit is contained in:
Cuong Manh Le
2023-11-14 10:08:13 +07:00
committed by Cuong Manh Le
parent 91d319804b
commit cd9c750884

View File

@@ -212,7 +212,9 @@ func setupUpstream(cfg *ctrld.Config) {
func (p *prog) run(reload bool, reloadCh chan struct{}) {
// Wait the caller to signal that we can do our logic.
<-p.waitCh
p.preRun()
if !reload {
p.preRun()
}
numListeners := len(p.cfg.Listener)
if !reload {
p.started = make(chan struct{}, numListeners)