This commit is contained in:
alex
2023-09-18 11:01:18 +08:00
parent 9754199772
commit 1cefb51aa9
2 changed files with 6 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ using JNPF.Extras.DatabaseAccessor.SqlSugar.Models;
using Aop.Api.Domain;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using bf = System.Reflection.BindingFlags;
using bf = System.Reflection.BindingFlags;
namespace JNPF.OAuth;
@@ -296,7 +296,7 @@ public class OAuthService : IDynamicApiController, ITransient
if (!userId.IsNullOrWhiteSpace())
{
var isStartedProperty = _backgroundService.GetType().GetProperty("IsStarted");
if (isStartedProperty?.GetValue(_backgroundService) is bool isStarted && !isStarted)
{
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
@@ -409,7 +409,9 @@ public class OAuthService : IDynamicApiController, ITransient
//modify by ly on 20230918
_backgroundService.PropertySetValue("IsStarted", false);
var isStartedProperty = _backgroundService.GetType().GetProperty("IsStarted");
isStartedProperty?.SetValue(_backgroundService, false);
UserManager.AsscessToken = string.Empty;
var tenantId = _userManager.TenantId ?? "default";