improve handling of failed devices

This commit is contained in:
Jakob Ketterl 2021-12-06 15:50:03 +01:00
parent 9c28143dfb
commit 397155983d

View File

@ -77,6 +77,7 @@ class SpectrumThread(SdrSourceEventClient):
return
self.dsp.stop()
self.dsp = None
if self.reader:
self.reader.stop()
self.reader = None
self.sdrSource.removeClient(self)
@ -92,6 +93,7 @@ class SpectrumThread(SdrSourceEventClient):
def onStateChange(self, state: SdrSourceState):
if state is SdrSourceState.STOPPING:
if self.dsp:
self.dsp.stop()
elif state == SdrSourceState.RUNNING:
if self.dsp is None: