don't wait on tomb if no datasources were started (#1019)
This commit is contained in:
parent
3f99330b3d
commit
76a80380e7
|
@ -104,12 +104,14 @@ func ShutdownCrowdsecRoutines() error {
|
|||
var reterr error
|
||||
|
||||
log.Debugf("Shutting down crowdsec sub-routines")
|
||||
if len(dataSources) > 0 {
|
||||
acquisTomb.Kill(nil)
|
||||
log.Debugf("waiting for acquisition to finish")
|
||||
if err := acquisTomb.Wait(); err != nil {
|
||||
log.Warningf("Acquisition returned error : %s", err)
|
||||
reterr = err
|
||||
}
|
||||
}
|
||||
log.Debugf("acquisition is finished, wait for parser/bucket/ouputs.")
|
||||
parsersTomb.Kill(nil)
|
||||
if err := parsersTomb.Wait(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue