mirror of
https://github.com/ManyakRus/starter.git
synced 2024-11-28 09:33:45 +02:00
сделал //Client = nil
This commit is contained in:
parent
cd1b4921f8
commit
ee88fc6441
@ -199,9 +199,9 @@ func CloseConnection() {
|
||||
|
||||
err := CloseConnection_err()
|
||||
if err != nil {
|
||||
log.Error("Postgres gorm CloseConnection() error: ", err)
|
||||
log.Error("Telegram bot CloseConnection() error: ", err)
|
||||
} else {
|
||||
log.Info("Postgres gorm connection closed")
|
||||
log.Info("Telegram bot connection closed")
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -773,6 +773,8 @@ func WaitStop() {
|
||||
|
||||
// CloseConnection - остановка работы клиента Телеграм
|
||||
func CloseConnection() {
|
||||
var err error
|
||||
|
||||
if stopTelegramFunc != nil {
|
||||
err := stopTelegramFunc()
|
||||
if err != nil {
|
||||
@ -780,6 +782,12 @@ func CloseConnection() {
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.Error("Telegram client CloseConnection() error: ", err)
|
||||
} else {
|
||||
log.Info("Telegram client connection closed")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FloodWait sleeps required duration and returns true if err is FLOOD_WAIT
|
||||
|
Loading…
Reference in New Issue
Block a user