Let gonsole bound an answer nobody reads
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with Timeouts and Env.Timeouts in gonsole, then NewServer in gonsole/serve.go (around lines 56-60), where WriteTimeout is never set. Read inflight.wrap (serve.go lines 198-204) and the open-request count in gonsole/idle.go (lines 40-46) to see why an unread answer keeps the server busy. Done means a test with an unread large answer lets the idle exit fire within 500 ms, and a zero Timeouts.Write leaves existing behaviour unchanged.
索引モデルが issue の本文から書いたものです。
説明
Downstream applications that exit when idle must not be held up by a visitor who stops reading.
Current state: gonsole.Timeouts has no write field and NewServer never sets WriteTimeout (gonsole/serve.go:56-60), so gonsole bounds no write. A test on gonsole 0.8.0 asked for a large answer and never read it. The handler's writes stalled once the system's buffer filled. The request still counted as open (gonsole/idle.go:40-46), so a 100 ms idle exit had not come 2 seconds later. On a cancel, as on SIGTERM, ServeListening waited for Grace and CancelGrace and returned ErrStillServing.
Proposal: one of two bounds. First, a Timeouts.Write field that Env.Timeouts reads from HTTP_WRITE_TIMEOUT with AllowZero(), and NewServer copies into WriteTimeout. In the test, 500 ms let the idle exit come. It also cuts a long answer to a visitor who still reads. Second, inflight.wrap (gonsole/serve.go:198-204) hands the handler a writer that calls http.ResponseController.SetWriteDeadline before each write. In the test, even 1 s cut a visitor still reading, but 2 s did not. That writer must keep Flush, and its ReadFrom must move the deadline as it copies, or http.ServeContent gets one deadline for the whole file. Start from Timeouts.Write, because it is one field and zero changes nothing. Test it with an answer nobody reads.
Trigger: a downstream application serves downloads with IDLE_EXIT set.
- 主要言語
- Go
- スター
- 69
- フォーク
- 3
- 平均マージ
- 9時間 11分
- マージ済み PR(30日)
- 38
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gopherium/framework のほかの issue
-
bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
gopherium/framework の issue をすべて見る
似ている issue
-
Project submission:オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
JakeChampion/lang#13132 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信