Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

connection close event is fired shortly after connection

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

提供された React useEffect 内の fetchEventSource 呼び出しから始め、同じサーバーを使用して、その close の挙動をネイティブの EventSource と比較します。POST リクエスト、SSE レスポンス、接続のライフサイクルを追跡し、その後、早期 close の再現可能な原因を特定します。原因が文書化され、ネイティブクライアントに対して接続の挙動が検証されれば完了です。

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

説明

Hello ,

I tried the same server side code and client side with this package and default event source . i see that server is getting close event as soon as connection is established . Just to make sure that my Server side code is not the issue I changed the client code to native event source and i cam seeing that it works as expected . i am interested to send header and other good things that this Package has . Can any one help me

My client side code (removed all other codes just to keep simple ) wrapped in useEffect reactHook

const fetchData = async () => {
      await fetchEventSource(`${serverBaseURL}`, {
        method: "POST",
        body: JSON.stringify({ userName, uniqueUserIdentifier }),
        headers: {
          Accept: "text/event-stream",
        },
        
        openWhenHidden: true,
        onclose() {
          console.log("Connection closed by the server");
        },
      });
    };
    fetchData();
  }, []);

主要言語
TypeScript
スター
2.9k
フォーク
197
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

Azure/fetch-event-source のほかの issue

Azure/fetch-event-source の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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