multi: move several wait group done calls to defer statements

This commit is contained in:
Federico Bond
2019-07-09 12:26:27 -03:00
committed by Oliver Gugger
parent 27849d3020
commit 10d94f99c0
5 changed files with 10 additions and 6 deletions

View File

@@ -1836,6 +1836,8 @@ out:
}
}
// Avoid an exit deadlock by ensuring WaitGroups are decremented before
// disconnect.
p.wg.Done()
p.Disconnect(exitErr)