cmd/cli: do not run pre run on reload

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-11-16 20:58:26 +07:00
1 parent 91d319804b
commit cd9c750884
1 file changed
+3 -1
+3 -1
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)