Fix worker check issue

Signed-off-by: Tang Le <at28997146@163.com>
This commit is contained in:
Tang Le 2017-02-04 15:37:06 +08:00
parent c0aca1833a
commit 008c47c2d3

View file

@ -132,10 +132,10 @@ NGINX master process died (%v): %v
// we wait until the workers are killed // we wait until the workers are killed
for { for {
conn, err := net.DialTimeout("tcp", "127.0.0.1:80", 1*time.Second) conn, err := net.DialTimeout("tcp", "127.0.0.1:80", 1*time.Second)
if err == nil { if err != nil {
conn.Close()
break break
} }
conn.Close()
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
} }
// start a new nginx master process // start a new nginx master process