Remove unneeded waiter object

This commit is contained in:
Quentin McGaw
2020-07-08 23:43:03 +00:00
parent 3d25db1bed
commit 5bf471767d

View File

@@ -129,8 +129,6 @@ func _main(background context.Context, args []string) int {
defer close(connectedCh)
go collectStreamLines(ctx, streamMerger, logger, signalConnected)
waiter := command.NewWaiter()
connections, err := providerConf.GetOpenVPNConnections(allSettings.OpenVPN.Provider.ServerSelection)
fatalOnError(err)
err = providerConf.BuildConf(
@@ -247,12 +245,6 @@ func _main(background context.Context, args []string) int {
exitStatus = 1
}
}
timeoutCtx, timeoutCancel := context.WithTimeout(background, time.Second)
defer timeoutCancel()
for _, err := range waiter.WaitForAll(timeoutCtx) {
logger.Error(err)
exitStatus = 1
}
wg.Wait()
return exitStatus
}