File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,6 @@ func (b *Bot) LoginWithUUID(uuid string) error {
152
152
// Logout 用户退出
153
153
func (b * Bot ) Logout () error {
154
154
if b .Alive () {
155
- if b .LogoutCallBack != nil {
156
- b .LogoutCallBack (b )
157
- }
158
155
info := b .Storage .LoginInfo
159
156
if err := b .Caller .Logout (info ); err != nil {
160
157
return err
@@ -287,7 +284,6 @@ func (b *Bot) stopSyncCheck(err error) bool {
287
284
}
288
285
b .err = err
289
286
b .Exit ()
290
- log .Printf ("exit with : %s" , err .Error ())
291
287
return false
292
288
}
293
289
@@ -313,6 +309,9 @@ func (b *Bot) Block() error {
313
309
314
310
// Exit 主动退出,让 Block 不在阻塞
315
311
func (b * Bot ) Exit () {
312
+ if b .LogoutCallBack != nil {
313
+ b .LogoutCallBack (b )
314
+ }
316
315
b .self = nil
317
316
b .cancel ()
318
317
}
You can’t perform that action at this time.
0 commit comments