1

Use other way to destroy Telegram connection on shutdown

This commit is contained in:
Vladimir Hodakov 2019-01-08 06:55:08 +04:00
parent a98179a6ed
commit 7612ce778f
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6

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