mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-10 19:56:45 +08:00
fix(routing): 清理 RouterBase 守卫异步等待的 MA0004
- 修复 RouterBase 进入守卫异步调用缺少 ConfigureAwait(false) 的机械型 MA0004 - 修复 RouterBase 离开守卫异步调用缺少 ConfigureAwait(false) 的机械型 MA0004
This commit is contained in:
parent
bad6c1b108
commit
e8eda8170c
@ -140,7 +140,7 @@ public abstract class RouterBase<TRoute, TContext> : AbstractSystem
|
||||
try
|
||||
{
|
||||
Log.Debug("Executing enter guard: {0} for {1}", guard.GetType().Name, routeKey);
|
||||
var canEnter = await guard.CanEnterAsync(routeKey, context);
|
||||
var canEnter = await guard.CanEnterAsync(routeKey, context).ConfigureAwait(false);
|
||||
|
||||
if (!canEnter)
|
||||
{
|
||||
@ -182,7 +182,7 @@ public abstract class RouterBase<TRoute, TContext> : AbstractSystem
|
||||
try
|
||||
{
|
||||
Log.Debug("Executing leave guard: {0} for {1}", guard.GetType().Name, routeKey);
|
||||
var canLeave = await guard.CanLeaveAsync(routeKey);
|
||||
var canLeave = await guard.CanLeaveAsync(routeKey).ConfigureAwait(false);
|
||||
|
||||
if (!canLeave)
|
||||
{
|
||||
@ -241,4 +241,4 @@ public abstract class RouterBase<TRoute, TContext> : AbstractSystem
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user