修正redis连接不释放
程序运行时间长会出现redis连接超过最大值错误:Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR max number of clients reached Signed-off-by: when <w_zhi_yuan@163.com>
This commit is contained in:
@@ -58,6 +58,7 @@ public class RedisAuthorizationCodeServices extends RandomValueAuthorizationCode
|
||||
RedisConnection conn=connectionFactory.getConnection();
|
||||
OAuth2Authentication auth = conn.getObject(PREFIX+code);
|
||||
conn.delete(PREFIX+code);
|
||||
conn.close();
|
||||
return auth;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user