0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-13 22:51:08 -05:00

Fix deadlock, ensure instances mutex unlocked (#2296)

it's a stupid mistake
This commit is contained in:
yyqbuct 2018-09-18 23:00:10 +08:00 committed by Matt Holt
parent 13a54dbdda
commit 13f9c34d16

View file

@ -858,6 +858,7 @@ func Stop() error {
for { for {
instancesMu.Lock() instancesMu.Lock()
if len(instances) == 0 { if len(instances) == 0 {
instancesMu.Unlock()
break break
} }
inst := instances[0] inst := instances[0]