Skip to content

Commit 37c2cb1

Browse files
committed
fix(Network): 修复RPC错误码处理条件判断错误
将默认值判断从`default`改为`0`,以正确处理错误码为0的情况
1 parent b5840f6 commit 37c2cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Network/Network/NetworkManager.RpcState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public bool TryReply(MessageObject message)
9797
var responseMessage = message as IResponseMessage;
9898
messageActorObject.Reply(responseMessage);
9999
_rpcEndHandler?.Invoke(this, message);
100-
if (responseMessage?.ErrorCode != default)
100+
if (responseMessage?.ErrorCode != 0)
101101
{
102102
_rpcErrorCodeHandler?.Invoke(this, message);
103103
}

0 commit comments

Comments
 (0)