mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
If ProxyServer() raises during singleton construction, _instance was left as _INITIALIZING permanently, causing all subsequent get_instance() callers to spin in an infinite gevent.sleep() loop. Wrap construction in try/except and reset _instance to None on failure so callers can retry. Also replace the non-atomic setnx() + expire() pair in try_acquire_ownership() with a single atomic SET NX EX call, consistent with the approach already used in extend_ownership() and eliminating the race window where a crash between the two calls could leave a key with no TTL (permanent ownership lock). |
||
|---|---|---|
| .. | ||
| services | ||
| __init__.py | ||
| apps.py | ||
| channel_status.py | ||
| client_manager.py | ||
| config_helper.py | ||
| constants.py | ||
| http_streamer.py | ||
| redis_keys.py | ||
| server.py | ||
| stream_buffer.py | ||
| stream_generator.py | ||
| stream_manager.py | ||
| url_utils.py | ||
| urls.py | ||
| utils.py | ||
| views.py | ||