Do not restart threads when started is false.

This commit is contained in:
Koen 2024-01-07 21:56:56 +01:00
parent 781d0797e7
commit 7d091382c0

View file

@ -252,7 +252,7 @@ class FCastCastingDevice : CastingDevice {
val thread = _thread
val pingThread = _pingThread
if (thread == null || !thread.isAlive || pingThread == null || !pingThread.isAlive) {
if (_started && (thread == null || !thread.isAlive || pingThread == null || !pingThread.isAlive)) {
Log.i(TAG, "(Re)starting thread because the thread has died")
_scopeIO?.let {