Unity Application freezing when network connection is lost. Is there any timeout parameter that can be configured ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, unity
- Domain
- game-dev, networking
Research direction
Start by tracing SendText during network loss and inspect how the timeout parameter set to -1 affects the send path. Check when the OnClose callback is invoked relative to the reported ~16-second freeze and profiler result. Done means the timeout behavior is understood and the issue states whether it can be configured or identifies the required change.
Written by the indexing model from the issue text.
Description
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.
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?
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from endel/NativeWebSocket
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
endel/NativeWebSocket#107 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
endel/NativeWebSocket#102 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
endel/NativeWebSocket#101 · 6 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
endel/NativeWebSocket#95 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
endel/NativeWebSocket#94 · 2 comments ·
All issues in endel/NativeWebSocket
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·