WebSocketConnect in reconnect case
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, javascript
- Domain
- networking
Research direction
Inspect the jslib WebSocketConnect method and its onclose handler, where instance.ws is deleted. Reproduce reconnecting after a socket is closed, then verify that the reconnect path no longer treats an undefined instance.ws as an existing socket.
Written by the indexing model from the issue text.
Description
Hi @endel
Thank you for your great work
I have tryed to resolve issue with reconnect socket that was close before
In jslib there is method WebSocketConnect
and in this method we have condition
if (instance.ws !== null) {...}
but if we called close socket before, we deleted instance.ws
instance.ws.onclose = function (ev) {
if (webSocketState.onClose)
Module.dynCall_vii(webSocketState.onClose, instanceId, ev.code);
delete instance.ws;
};
then I try to connect web socket again and instance.ws !== null will be always true
in this case "instance.ws" will be 'undefined', so the better condition will be '!=' not '!=='
Does it make sense?
Thank you
- 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 ·