coder / coder/websocket

Add protection against concurrent Readers

オープン
#391 コメント 20 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Go
スター
5.5k
フォーク
372
PR マージ指標
30日以内にマージされた PR はありません

説明

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
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。