1
Fork 0

Use other way to destroy Telegram connection on shutdown

master
Vladimir Hodakov 2019-01-08 06:55:08 +04:00
parent a98179a6ed
commit 7612ce778f
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6
1 changed files with 4 additions and 1 deletions

View File

@ -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")
}