Background thread for continuous stream fetching
(self)
| 261 | return seq |
| 262 | |
| 263 | def _fetch_loop(self): |
| 264 | """Background thread for continuous stream fetching""" |
| 265 | while self.running: |
| 266 | try: |
| 267 | fetcher = StreamFetcher(self, self.buffer) |
| 268 | fetch_stream(fetcher, self.url_changed, self.next_sequence) |
| 269 | except Exception as e: |
| 270 | logging.error(f"Stream error: {e}") |
| 271 | time.sleep(5) # Wait before retry |
| 272 | |
| 273 | self.url_changed.clear() |
| 274 | |
| 275 | def start(self): |
| 276 | """Start the background fetch thread""" |
nothing calls this directly
no test coverage detected