-
Notifications
You must be signed in to change notification settings - Fork 91
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 editor hangs when losing blockchain connection. #221
Comments
I narrowed the cause of the hang to the WebSocket RPC connection. The next thing to figure out: |
Perhaps this is the answer: |
When listening to socket messages you need to switch back to mainthread before accessing any unity functions. You can do that with await UniTask.SwitchToMainThread(); @GabrielePicco would be good to add this to the subscribe function and maybe that also makes i hang? |
Thanks @kilogold, definitely helpful context. On unsubscribe, there is the logic to try-reconnect (which is needed as websockets sometimes lose connection), but there could be something wrong in the handling if the rpc is unreachable. I will investigate it. |
Describe the bug
Unity Editor is frozen when local blockchain connection is lost.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Desktop:
MacOS
Ventura 13.5.1
Additional context
Unity editor version:
2021.3.32f1
The text was updated successfully, but these errors were encountered: