From 69d97ec2b2927a6705f90708db0f7da4431a24dd Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Mon, 15 Jul 2013 01:25:55 -0300 Subject: [PATCH] anidb: Always remove credentials on Logout() Even if they were never used. --- auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth.go b/auth.go index de355f1..a4058a9 100644 --- a/auth.go +++ b/auth.go @@ -119,10 +119,10 @@ func (adb *AniDB) Auth(username, password, udpKey string) (err error) { // Logs the user out and removes the credentials from the AniDB struct. func (adb *AniDB) Logout() error { - if adb.udp.connected { - adb.udp.credentials.shred() - adb.udp.credentials = nil + adb.udp.credentials.shred() + adb.udp.credentials = nil + if adb.udp.connected { adb.udp.connected = false return adb.udp.Logout() } -- 2.44.0