Add protection against concurrent Readers
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
- go
- Domain
- networking
Research direction
Start in write.go around line 300 and trace how writeHeader.rsv1, rsv2, and rsv3 are set while concurrent readers or writers are active. Use the reported unexpected RSV-bits error as the failure signal. Done means the concurrent-reader scenario no longer produces invalid RSV bits, with a regression test covering the behavior if the repository has an appropriate test entry point.
Written by the indexing model from the issue text.
Description
During my use of the library(server and client both v1.8.7), the server occasionally receives the following prompt,
failed to get reader: received header with unexpected rsv bits set: false:true:true
which seems to be related to this part of the code.
write.go L300:
c.writeHeader.rsv1 = false
if flate && (opcode == opText || opcode == opBinary) {
c.writeHeader.rsv1 = true
}
Could you please confirm if it is necessary to add the following code here?
c.writeHeader.rsv1 = false
c.writeHeader.rsv2 = false
c.writeHeader.rsv3 = false
- Dominant language
- Go
- Stars
- 5.5k
- Forks
- 377
- 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 coder/websocket
-
Must not wrap io.EOF Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
export wstest Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
Similar issues
-
textual definition
Difficulty 1/5 Under an hour Newbie friendliness 90/100
geneontology/go-ontology#32653 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
needs design
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100