multi: move several wait group done calls to defer statements

This commit is contained in:
Federico Bond authored and Oliver Gugger committed 2020-11-23 14:48:44 +01:00
1 parent 27849d3020
commit 10d94f99c0
5 files changed
+10 -6

No files matched your search

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