Skip to content

docs(eventsource): document connection lifecycle and close usage#4872

Open
nthbotast wants to merge 1 commit intonodejs:mainfrom
nthbotast:docs/eventsource-lifecycle-536
Open

docs(eventsource): document connection lifecycle and close usage#4872
nthbotast wants to merge 1 commit intonodejs:mainfrom
nthbotast:docs/eventsource-lifecycle-536

Conversation

@nthbotast
Copy link
Contributor

Summary

  • add a dedicated section describing how EventSource manages long-lived text/event-stream connections
  • document that .close() should be called to release connection resources when no longer needed
  • add a small example with onmessage, onerror, and explicit shutdown

Closes #536

Validation

  • git diff --check

Signed-off-by: Nathanael BOT <nathanaelbot@minidenathanael.home>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.03%. Comparing base (fb05ad6) to head (428d53a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4872   +/-   ##
=======================================
  Coverage   93.02%   93.03%           
=======================================
  Files         112      112           
  Lines       35176    35176           
=======================================
+ Hits        32723    32725    +2     
+ Misses       2453     2451    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't mind these kind of contributions as are not making much of a harm, but would appreciate to state that as disclosure of the PR description

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to handle text/event-stream?

4 participants