Try to terminal all goroutines at shutdown gracefully
This commit is contained in:
parent
dca290beb1
commit
f240def745
@ -24,6 +24,7 @@ func ZookeeperReceiver(client *tdlib.Client) {
|
||||
receiver := client.AddEventReceiver(&tdlib.UpdateNewMessage{}, fwMessagesFilter, 5)
|
||||
log.Debug().Msg("Receiver added")
|
||||
|
||||
go func() {
|
||||
for newMsg := range receiver.Chan {
|
||||
updateMsg := (newMsg).(*tdlib.UpdateNewMessage)
|
||||
// Check if message text contains needed battle data
|
||||
@ -74,4 +75,5 @@ func ZookeeperReceiver(client *tdlib.Client) {
|
||||
<-c.ShutdownDone
|
||||
return
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user