forked from Silverfish/proton-bridge
Fix incorrect use of `sync.WaitGroup` use to wait on sync jobs that fail. After calling `WaitGroup.Wait()` it is advised to call `WaitGroup.Add` until the existing counter has reached 0. The code has been updated with a different mechanism that achieves the same behavior which was previously available.