fix: P2P Stream timeout for battery cameras relying on STREAM_TIMEOUT_SECONDS#1451
Merged
fuatakgun merged 1 commit intofuatakgun:masterfrom Apr 8, 2026
Merged
Conversation
Owner
|
Thanks for the PR. Can you post your test results too? |
Owner
|
No no, it was already merged. I was just curious, thanks again |
Contributor
Author
|
Thanks for merging. In go2rtc v1.9.0+, I needed this fix also to make my Eufy camera work. |
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.
Description
Currently, battery-powered doorbells inherently take 3-10 seconds to wake up from deep sleep and negotiate a connection. While a global
STREAM_TIMEOUT_SECONDSof 15s is defined inconst.py, bothcamera.pyandp2p_streamer.pyuse arbitrarily hardcoded timeouts (5s and 1s respectively). This causes streams to drop withLivestreamNotRunningErroron battery cameras.This PR replaces the hardcoded
asyncio.wait_for(..., 5)with the existingSTREAM_TIMEOUT_SECONDS, and calculates the streamer retry limit dynamically based on this config.