Fixed exception when deleting SDR source twice.

This commit is contained in:
Marat Fayzullin 2024-01-22 11:20:10 -05:00
parent f1952f9d13
commit c3d651da74
3 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,7 @@
- Added ability to delete files, when authorized. - Added ability to delete files, when authorized.
- Added locking to connector-based SDR sources. - Added locking to connector-based SDR sources.
- Improved EIBI schedules display on the map. - Improved EIBI schedules display on the map.
- Fixed exception when disabling SDR source twice.
- Fixed HL2 noise after HL2 first initialized. - Fixed HL2 noise after HL2 first initialized.
- No longer reporting AIS messages to IGATE. - No longer reporting AIS messages to IGATE.

1
debian/changelog vendored
View File

@ -3,6 +3,7 @@ openwebrx (1.2.45) bullseye jammy; urgency=low
* Added ability to delete files, when authorized. * Added ability to delete files, when authorized.
* Added locking to connector-based SDR sources. * Added locking to connector-based SDR sources.
* Improved EIBI schedules display on the map. * Improved EIBI schedules display on the map.
* Fixed exception when disabling SDR source twice.
* Fixed HL2 noise after HL2 first initialized. * Fixed HL2 noise after HL2 first initialized.
* No longer reporting AIS messages to IGATE. * No longer reporting AIS messages to IGATE.

View File

@ -101,15 +101,18 @@ class SourceStateHandler(SdrSourceEventClient):
self.source.removeClient(self) self.source.removeClient(self)
def onFail(self): def onFail(self):
if self.key in self.pm:
del self.pm[self.key] del self.pm[self.key]
def onDisable(self): def onDisable(self):
if self.key in self.pm:
del self.pm[self.key] del self.pm[self.key]
def onEnable(self): def onEnable(self):
self.pm[self.key] = self.source self.pm[self.key] = self.source
def onShutdown(self): def onShutdown(self):
if self.key in self.pm:
del self.pm[self.key] del self.pm[self.key]