Socket OnClose received before completing further messages in OnMessage
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
#Scenario1 :
Request to close the connection & server sends the ACK & connection close(only 2 responses). OnMessage it receives those 2 responses properly then OnClose listener get the intimation of connection closed.
#Scenario2 :
Request to close the connection & server sends few more messages on last it also sends and ACK & Close connection(total of 10 responses). In that time,
OnMessage receiving the messages & handling it. While receiving it OnClose and triggered. So, last few messages which are supposed to receive got cancelled and not received on the client end, due to socket connection got closed.
My question is that, It is supposed received all the messages and then on Queue it should trigger OnClose in the socket which is listening in the client side. But, due to the slow internet it takes time to receive the packets which are supposed to receive before connection got closed.
How it should be handled? Any suggestion or work around to handle this case?
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.
Research direction
No files, tests, or entry points are named. Start by reproducing Scenario 2 and reviewing the WebSocket message and close-event ordering described in the issue; done requires an agreed behavior and a focused resolution for messages sent before connection closure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100