Skip to content

Conversation

@NeoCat
Copy link

@NeoCat NeoCat commented Nov 17, 2025

When URLStreamBuffered is used on ESP32 and the stream is temporarily stopped for several seconds, the task watchdog timer is invoked within the BufferedTaskStream task and ESP32 is reset, because the task is blocked while readBytes() from the stream.
( This can be seen in the stream like jazz cafe, that has a few seconds gaps between tunes. )

This patch avoids the WDT by calling dalay() if there is no readable bytes.

In addition, if the stream is stopped, the sink like AudioPlayer::copy() from the URLStreamBuffered is also blocked and makes it difficult to handle timeouts (e.g. switching to the next source). This changes the default timeout of SynchronizedNBufferRTOST to 1 second, so that the copier can return with 0 copied byte after the timeout.

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

Labels

None yet

1 participant