Bad handling of sending stream makes lib not RFC compatible and KeepClean useless in some cases.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- networking
Research direction
Start in WebSocket.cs at the private send(Opcode opcode, Stream sourceStream) method and compare its locking and fragmented-send behavior with RFC 6455 section 5.5. Reproduce a slow or large stream transfer with KeepClean enabled, then verify that control-frame handling is no longer stalled during the transfer and that the connection remains usable.
Written by the indexing model from the issue text.
Description
I do not know if this is required, but for WebSocket.cs call:
private bool send (Opcode opcode, Stream sourceStream)
send lock is put prematurely. This will violate RFC behaviour described in: https://datatracker.ietf.org/doc/html/rfc6455#section-5.5
Also makes option KeepClean switch useless when sending larger data or network stream is getting slow. Ping request is stalled until fragmented transfer finish transfer, but should be sent in between data fragments as RFC allows it. Because of this and flawed internal logic, connection can be closed due to Ping not responding with KeepClean set to true.
Current workaround is to implement custom Ping/Pong logic.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- 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 sta/websocket-sharp
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sta/websocket-sharp#201 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
sta/websocket-sharp#762 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
sta/websocket-sharp#761 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sta/websocket-sharp#759 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
sta/websocket-sharp#758 · 1 comment ·
All issues in sta/websocket-sharp
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
azurenoops/spin_agent#975 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·