Use other way to destroy Telegram connection on shutdown
This commit is contained in:
parent
a98179a6ed
commit
7612ce778f
@ -83,6 +83,9 @@ func Connect() {
|
||||
|
||||
// Shutdown disconnects from Telegram
|
||||
func Shutdown() {
|
||||
client.DestroyInstance()
|
||||
_, err := client.Destroy()
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to destroy Telegram client instance")
|
||||
}
|
||||
log.Info().Msg("Connection with Telegram closed")
|
||||
}
|
||||
|
Reference in New Issue
Block a user