fix: log a clean SSE stream end at INFO, not WARNING - #45
Merged
Conversation
A Teslemetry API deploy closes every open SSE connection cleanly, which the listen loop treated identically to an abrupt disconnect and logged at WARNING - putting a false-alarm warning in every streaming Home Assistant install's log on every deploy. A clean end (the response body finishes with no exception) now logs at INFO and still reconnects immediately; an abrupt end (ClientPayloadError, ClientConnectionError, etc.) keeps its WARNING and backoff unchanged. Bumps 0.13.0 -> 0.13.1. Claude-Session: https://claude.ai/code/session_015AmmAcBd5k3izABQJBXxrk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
__anext__'swhile self.activeloop treated a clean end of the response body the same as an abrupt one -TeslemetryStreamEndedat WARNING - so every streaming Home Assistant install logs a false-alarm warning on every deploy.async forfinishes with no exception) now logs "Stream ended by server, reconnecting" at INFO and reconnects immediately, exactly as before. An abrupt end (aiohttp.ClientErrorand subclasses -ClientPayloadError,ClientConnectionError, etc.) keeps its WARNING and backoff unchanged, and 401/403 handling is untouched.TeslemetryStreamEndedstays exported and is still raised/caught internally; no behavior change for anything importing it.0.13.0->0.13.1(pragmatic versioning, no API change).