[Bug] Missing stream.Close() in processStreamingOutput causes potential resource leaks

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

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

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

2026年2月18日 から。

評価

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

説明

Bug

Hi team,

https://github.com/awsdocs/aws-doc-sdk-examples/blob/12ee8a27fa96b7a944d1b22f58ca36ac5b4dcdc5/gov2/bedrock-runtime/actions/invoke_model_with_response_stream.go#L107

While this works perfectly for the CLI use case, Close() isn't called on the event stream. The SDK documentation notes this is required to clean up the underlying reader/writer.

If customers copy this snippet into a long-running web server (instead of a CLI), it will leak goroutines. Adding a defer stream.Close() would make this safe for copy-pasting into production apps.

主要言語
Java
スター
10.5k
フォーク
5.8k
平均マージ
2日 21時間
マージ済み PR(30日)
30

環境構築

はじめの一歩

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

awsdocs/aws-doc-sdk-examples のほかの issue

awsdocs/aws-doc-sdk-examples の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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