From af1a99c130703e95d773f02d2c29e0e5f231c020 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 31 Oct 2019 19:13:33 +0100 Subject: [PATCH] prevent deadlocks by shutting down services in correct order --- owrx/service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/owrx/service.py b/owrx/service.py index 7a583c3..16a6359 100644 --- a/owrx/service.py +++ b/owrx/service.py @@ -284,11 +284,14 @@ class ServiceHandler(object): resampler_props["samp_rate"] = bw + 24000 resampler = Resampler(resampler_props, self.getAvailablePort(), self.source) resampler.start() - self.services.append(resampler) for dial in group: self.services.append(self.setupService(dial["mode"], dial["frequency"], resampler)) + # resampler goes in after the services since it must not be shutdown as long as the services are still running + self.services.append(resampler) + + def optimizeResampling(self, freqs, bandwidth): freqs = sorted(freqs, key=lambda f: f["frequency"]) distances = [