aio-libs / aiohttp-sse

Server-sent events support for aiohttp
Other
194 stars 35 forks source link

Add public state for SSE #401

Closed Olegt0rr closed 6 months ago

Olegt0rr commented 1 year ago

What do these changes do?

Since https://github.com/aio-libs/aiohttp/issues/3105 is abandoned for many years, I think we can make simple way to check SSE state (based on ping). After 3105 problem become closed, it will be possible to rely on the new logic in this method, saving the contract.

Are there changes in behaviour for the user?

Added the ability to publicly access the connection status via .is_connected() method.

Related issue number

Closes #391

Checklist

wiryonolau commented 8 months ago

Hi possible to merge this ?

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (21cb76e) 99.47% compared to head (b97c9ce) 99.49%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #401 +/- ## ========================================== + Coverage 99.47% 99.49% +0.01% ========================================== Files 4 4 Lines 381 394 +13 Branches 45 45 ========================================== + Hits 379 392 +13 Misses 1 1 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.