From 4fa5d022430ded38d18b4f1cca572ac7a800cfe1 Mon Sep 17 00:00:00 2001 From: Trumeet Date: Wed, 12 Jan 2022 21:45:19 -0800 Subject: Do not automatically logout It causes issues with things like locks. --- README.md | 4 ++-- tdutils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6dfb7ff..1cba751 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ Currently, there are only a few options for you: ### Log out -TDLib treats bots as normal accounts, so you need to log out if you want to change the bot token. To simplify your logout process, MuteBot will automatically logout your bot if you send SIGINT or SIGTERM to the daemon. Therefore, you can safely specify a new bot token at the next startup without worrying that it is still using the old one. However, you may still need to logout manually using the `-l` switch. It does nothing except for logging out the current bot session, if any. +TDLib treats bots as normal accounts, so you need to log out if you want to change the bot token. You may logout using the `-l` switch. It does nothing except for logging out the current bot session, if any. # License WTFPL -by Yuuta Liang \ No newline at end of file +by Yuuta Liang diff --git a/tdutils.c b/tdutils.c index 0c50b00..9fd936f 100644 --- a/tdutils.c +++ b/tdutils.c @@ -66,7 +66,7 @@ static void *main_sighandler(void *arg) { case SIGINT: case SIGTERM: if (td == -1) goto cleanup; - td_send(TdCreateObjectLogOut(), &fetal_cb, NULL); + tg_close(); goto cleanup; default: break; -- cgit v1.2.3