mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-18 01:50:50 +00:00
Fix crash when stulbe initialization fails
This commit is contained in:
parent
bfce1f6ce4
commit
785884551e
1 changed files with 6 additions and 5 deletions
3
main.go
3
main.go
|
@ -128,13 +128,14 @@ func main() {
|
|||
if err != nil {
|
||||
log.WithError(err).Error("Stulbe initialization failed! Module was temporarely disabled")
|
||||
moduleConfig.EnableStulbe = false
|
||||
}
|
||||
} else {
|
||||
defer stulbeManager.Close()
|
||||
go func() {
|
||||
err := stulbeManager.ReceiveEvents()
|
||||
stulbeLogger.WithError(err).Error("Stulbe subscription died unexpectedly!")
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
var loyaltyManager *loyalty.Manager
|
||||
loyaltyLogger := wrapLogger("loyalty")
|
||||
|
|
Loading…
Reference in a new issue