NativeWebSocket icon indicating copy to clipboard operation
NativeWebSocket copied to clipboard

Unity Application freezing when network connection is lost. Is there any timeout parameter that can be configured ?

Open saikiran469 opened this issue 4 years ago • 1 comments

Hi @endel, when I was testing, I came across this issue.

Context: Messages would be published from my application continuously with a frequency of 20 messages per second. When the application is running and the network connection is stable, and all the messages sent through this function - SendText are being successfully delivered.

Issue: With the above-mentioned context, in such a case when the internet gets disconnected, the Unity Application is getting frozen. When checked with the profiler, below is the information gathered. WebSocketSendMessageFunctionProfiler

The application is coming back to a normal state after ~16 seconds. And when the application comes back to a normal state, the below error is being logged in the console. And only then OnClose callback of WebSocket is getting invoked. WebSocketExceptionInfo.txt

I assume this might happen due to the setting "-1" as a timeout parameter for a task. If that is the case, can you please let me know on how to configure the timeout parameter?

saikiran469 avatar Jul 15 '21 07:07 saikiran469

is there any update on this issue ?

HaSyHieu avatar Mar 11 '24 09:03 HaSyHieu