From 8c9d36ec163058157ec310fa87cffc9ce9d0f864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=90=83=E7=82=B9=E8=8B=B9=E6=9E=9C?= <73388495+eatmoreapple@users.noreply.github.com> Date: Wed, 14 Dec 2022 00:12:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=83=AD=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=20:ambulance:=20(#166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot.go b/bot.go index f4d95af..a65c5f6 100644 --- a/bot.go +++ b/bot.go @@ -85,9 +85,12 @@ func (b *Bot) HotLogin(storage HotReloadStorage, retries ...bool) error { if !ok { return err } - if retErr == cookieInvalid { + // TODO add more error code handle here + switch retErr { + case cookieInvalid: return b.Login() } + return err } } return err