Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unity poco sdk出现rpctimeout的情况 #80

Open
qiutao opened this issue Oct 13, 2020 · 5 comments
Open

unity poco sdk出现rpctimeout的情况 #80

qiutao opened this issue Oct 13, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@qiutao
Copy link

qiutao commented Oct 13, 2020

经测试是由于
PocoManager.cs的Update函数里去
inbox.TryRemove(tcpClientKey, out internalClientToBeThrowAway);
这个是在主线程里操作的。同时在server_Received函数里去
inbox.AddOrUpdate(tcpClientKey, internalClient, (n, o) =>
{
return internalClient;
});
这个是在异步线程里的。
在主线程还在foreach循环的过程中添加了一个rpc请求进来。然后foreach循环结束时就被Remove掉。导致这个rpc请求丢失。airtest的client端一直未等待到这个rpc回来。

望修复

@qiutao
Copy link
Author

qiutao commented Oct 13, 2020

我本地先用mutex把foreach循环 和AddOrUpdate程序 先包进来了。这样解决了。等待官方修复

@yimelia
Copy link
Member

yimelia commented Oct 14, 2020

请问unity的版本号是多少?

@yimelia yimelia added the bug Something isn't working label Oct 14, 2020
@qiutao
Copy link
Author

qiutao commented Oct 14, 2020

请问unity的版本号是多少?

unity 2019.4.8f1

@yimelia
Copy link
Member

yimelia commented Oct 16, 2020

能否顺便提供一下问题具体复现的方式?以及unity是打包成了android apk吗?还是直接用了编辑器里的?
我们可能需要更多信息才能方便重现和修复问题

@qiutao
Copy link
Author

qiutao commented Oct 19, 2020

能否顺便提供一下问题具体复现的方式?以及unity是打包成了android apk吗?还是直接用了编辑器里的?
我们可能需要更多信息才能方便重现和修复问题

打包成apk了。在真机上面测试的apk。ide通过WIFI连真机。(因为真机全放在集群里)
我没法提供APK测试。大概描述一下重现过程:
在上下文里调用set_text的API。会产生两条client -> server的消息(很奇怪。一般是一来一回)。然后一般情况下会有两条回来的消息。偶尔就会timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants