Tencent / GAutomator

Automation for mobile games
1.34k stars 384 forks source link

fix the unstable socket connection error #116

Open ababycat opened 1 year ago

ababycat commented 1 year ago

If notify_one() of the condition variable has been called before the function wait(), wait() blocks the connection until the next connection is established.

So you get an socket connect Error. #102 etc. It will occur more frequently on the iOS platform.

solution: Use FScopedEvent of UE to synchronize the finished status.

reference:

https://en.cppreference.com/w/cpp/thread/condition_variable/notify_one https://docs.unrealengine.com/4.26/en-US/API/Runtime/Core/Misc/FScopedEvent/

tencent-adm commented 1 year ago

CLA assistant check
All committers have signed the CLA.