Browse Source

优化逻辑

zhou-hao 7 năm trước cách đây
mục cha
commit
6805abfeca

+ 2 - 1
hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/token/DefaultUserTokenManager.java

@@ -194,7 +194,8 @@ public class DefaultUserTokenManager implements UserTokenManager {
                 Set<String> tokens = getUserToken(userId);
                 if (!tokens.isEmpty()) {
                     tokens.remove(token);
-                } else {
+                }
+                if (tokens.isEmpty()) {
                     userStorage.remove(tokenObject.getUserId());
                 }
             }