Fix deadlock, ensure instances mutex unlocked (#2296)

it's a stupid mistake
pull/2303/head
yyqbuct 2018-09-18 23:00:10 +08:00 committed by Matt Holt
parent 13a54dbdda
commit 13f9c34d16
1 changed files with 1 additions and 0 deletions

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]