fix: notification sends started by domain and proxy host events use the request context

オープン
#2,104 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Wikid82 がすでに取り組んでいます。

2026年12月1日 から。

評価

この issue はまだ評価されていません。

説明

backend

What

SendExternal is called with c.Request.Context() from handlers and then starts one goroutine per provider. Go cancels the request context when the handler returns, so a send that has not finished by then can fail with a cancelled-context error. Test sends use context.Background() and succeed.

Where

  • backend/internal/api/handlers/domain_handler.go (lines 54 and 74)
  • backend/internal/api/handlers/proxy_host_handler.go (lines 598 and 905)
  • backend/internal/services/notification_service.go (SendExternal, around line 214 onward)

Evidence

During container checks, Gotify sends triggered by creating a domain or proxy host failed with "outbound request failed: connection failed", while a test send a moment later succeeded. The call sites and the dispatch code are the same on development. The exact mapping from a cancelled context to that message was not confirmed.

Severity

Medium-low (event notifications may be dropped, intermittently).

Suggested approach

Pass a context detached from the request (for example context.WithoutCancel(ctx) with a timeout) into the goroutines, and add a test that returns from the handler before the sender completes.

主要言語
Go
スター
17
フォーク
2
平均マージ
1時間 42分
マージ済み PR(30日)
173

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Wikid82/Charon のほかの issue

Wikid82/Charon の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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