This commit is contained in:
CortexCore
2024-08-10 09:09:31 +08:00
parent 5038fe33d1
commit 68a998ff96
11 changed files with 187 additions and 4 deletions

View File

@@ -421,10 +421,17 @@ namespace BITKit.Net
var fieldInfo = handle.GetType().GetField(eventInfo.Name,ReflectionHelper.Flags)!;
var eventDelegate = fieldInfo.GetValue(handle) as MulticastDelegate;
foreach (var del in eventDelegate!.GetInvocationList())
if (eventDelegate is null)
{
del.Method.Invoke(del.Target, pars);
BIT4Log.Warning<KcpNetClient>($"未找到对应的事件:{rpcName}");
}
else
{
foreach (var del in eventDelegate.GetInvocationList())
{
del.Method.Invoke(del.Target, pars);
}
}
}
else