From 13f9c34d161693c1c0828fea3750d01c068174b6 Mon Sep 17 00:00:00 2001 From: yyqbuct Date: Tue, 18 Sep 2018 23:00:10 +0800 Subject: [PATCH] Fix deadlock, ensure instances mutex unlocked (#2296) it's a stupid mistake --- caddy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/caddy.go b/caddy.go index a29f05d79..d2f60001d 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]