wasm: Close with codes other than 1000 throws, so CloseNow never closes
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- go
- 領域
- networking
調査の方向性
The issue describes the failure in the js/wasm build when Conn.Close passes unsupported codes to the browser's WebSocket.close, and links PR #576, which is already open. Read that pull request and the Close/CloseNow path it changes; the issue's expected behavior is that rejected codes are sent as 1000 so the browser closes the socket without an error or panic.
索引モデルが issue の本文から書いたものです。
説明
In the js/wasm build, Conn.Close passes the code straight to the browser's WebSocket.close, which only accepts 1000 and 3000-4999 and throws InvalidAccessError for anything else. This package closes with 1001 (CloseNow), 1008 (read or dial context done), 1009 (read limit) and 1011 (write error), so all of those return an error and leave the socket open. Under TinyGo the throw is not recovered, so the program panics.
To reproduce, dial any server and call c.CloseNow(). In Chromium it returns:
failed to close WebSocket: JavaScript error: Failed to execute 'close' on 'WebSocket': The close code must be either 1000, or between 3000 and 4999. 1001 is neither.
A fix is to send 1000 to the browser for the codes it rejects. I have a PR for it.
- 主要言語
- Go
- スター
- 5.5k
- フォーク
- 379
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/websocket のほかの issue
-
Must not wrap io.EOF対応中かも @Yanhu007 が 174 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
export wstestオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
coder/websocket の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/DebateAI#611 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MHSanaei/3x-ui#6737 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
terraform-provider
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
ClickHouse/terraform-provider-clickhousedbops#281 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
open-telemetry/opentelemetry-go-compile-instrumentation#1450 ·
メンテナーはふだん 2 日以内に返信