|
@@ -182,10 +182,7 @@ namespace ET.Server
|
|
|
MessageLocationSender messageLocationSender = self.GetOrCreate(entityId);
|
|
MessageLocationSender messageLocationSender = self.GetOrCreate(entityId);
|
|
|
|
|
|
|
|
Scene root = self.Root();
|
|
Scene root = self.Root();
|
|
|
-
|
|
|
|
|
- int rpcId = root.GetComponent<MessageSender>().GetRpcId();
|
|
|
|
|
- iRequest.RpcId = rpcId;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Type iRequestType = iRequest.GetType();
|
|
|
long actorLocationSenderInstanceId = messageLocationSender.InstanceId;
|
|
long actorLocationSenderInstanceId = messageLocationSender.InstanceId;
|
|
|
int coroutineLockType = (self.LocationType << 16) | CoroutineLockType.MessageLocationSender;
|
|
int coroutineLockType = (self.LocationType << 16) | CoroutineLockType.MessageLocationSender;
|
|
|
using (await root.GetComponent<CoroutineLockComponent>().Wait(coroutineLockType, entityId))
|
|
using (await root.GetComponent<CoroutineLockComponent>().Wait(coroutineLockType, entityId))
|
|
@@ -197,7 +194,7 @@ namespace ET.Server
|
|
|
|
|
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- return await self.CallInner(messageLocationSender, rpcId, iRequest);
|
|
|
|
|
|
|
+ return await self.CallInner(messageLocationSender, iRequest);
|
|
|
}
|
|
}
|
|
|
catch (RpcException)
|
|
catch (RpcException)
|
|
|
{
|
|
{
|
|
@@ -207,12 +204,12 @@ namespace ET.Server
|
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
|
{
|
|
{
|
|
|
self.Remove(messageLocationSender.Id);
|
|
self.Remove(messageLocationSender.Id);
|
|
|
- throw new Exception($"{iRequest}", e);
|
|
|
|
|
|
|
+ throw new Exception($"{iRequestType.FullName}", e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static async ETTask<IResponse> CallInner(this MessageLocationSenderOneType self, MessageLocationSender messageLocationSender, int rpcId, IRequest iRequest)
|
|
|
|
|
|
|
+ private static async ETTask<IResponse> CallInner(this MessageLocationSenderOneType self, MessageLocationSender messageLocationSender, IRequest iRequest)
|
|
|
{
|
|
{
|
|
|
int failTimes = 0;
|
|
int failTimes = 0;
|
|
|
long instanceId = messageLocationSender.InstanceId;
|
|
long instanceId = messageLocationSender.InstanceId;
|
|
@@ -234,9 +231,9 @@ namespace ET.Server
|
|
|
|
|
|
|
|
if (messageLocationSender.ActorId == default)
|
|
if (messageLocationSender.ActorId == default)
|
|
|
{
|
|
{
|
|
|
- return MessageHelper.CreateResponse(requestType, rpcId, ErrorCore.ERR_NotFoundActor);
|
|
|
|
|
|
|
+ return MessageHelper.CreateResponse(requestType, 0, ErrorCore.ERR_NotFoundActor);
|
|
|
}
|
|
}
|
|
|
- IResponse response = await root.GetComponent<MessageSender>().Call(messageLocationSender.ActorId, rpcId, iRequest, needException: false);
|
|
|
|
|
|
|
+ IResponse response = await root.GetComponent<MessageSender>().Call(messageLocationSender.ActorId, iRequest, needException: false);
|
|
|
|
|
|
|
|
if (messageLocationSender.InstanceId != instanceId)
|
|
if (messageLocationSender.InstanceId != instanceId)
|
|
|
{
|
|
{
|