fix errors on shutdown (duplicate calls)

This commit is contained in:
Jakob Ketterl 2021-08-26 17:22:10 +02:00
parent ee3d934529
commit 3bb4f48faf

View File

@ -84,7 +84,11 @@ class SpectrumThread(SdrSourceEventClient):
self.dsp.setReader(self.sdrSource.getBuffer().getReader()) self.dsp.setReader(self.sdrSource.getBuffer().getReader())
def onFail(self): def onFail(self):
if self.dsp is None:
return
self.dsp.stop() self.dsp.stop()
def onShutdown(self): def onShutdown(self):
if self.dsp is None:
return
self.dsp.stop() self.dsp.stop()