diff --git a/caddy.go b/caddy.go index a29f05d7..d2f60001 100644 --- a/caddy.go +++ b/caddy.go @@ -858,6 +858,7 @@ func Stop() error { for { instancesMu.Lock() if len(instances) == 0 { + instancesMu.Unlock() break } inst := instances[0]