fully initialize sdr devices
* makes always-on work as expected * prevents race conditions when multiple clients connect at the same time
This commit is contained in:
parent
2c04d40c53
commit
05096c2a16
@ -56,7 +56,8 @@ Support and info: https://groups.io/g/openwebrx
|
||||
return
|
||||
|
||||
# Get error messages about unknown / unavailable features as soon as possible
|
||||
SdrService.loadProps()
|
||||
# start up "always-on" sources right away
|
||||
SdrService.getSources()
|
||||
|
||||
Services.start()
|
||||
|
||||
|
@ -13,7 +13,7 @@ class SdrService(object):
|
||||
lastPort = None
|
||||
|
||||
@staticmethod
|
||||
def loadProps():
|
||||
def _loadProps():
|
||||
if SdrService.sdrProps is None:
|
||||
pm = Config.get()
|
||||
featureDetector = FeatureDetector()
|
||||
@ -60,7 +60,6 @@ class SdrService(object):
|
||||
|
||||
@staticmethod
|
||||
def getSource(id):
|
||||
SdrService.loadProps()
|
||||
sources = SdrService.getSources()
|
||||
if not sources:
|
||||
return None
|
||||
@ -70,7 +69,7 @@ class SdrService(object):
|
||||
|
||||
@staticmethod
|
||||
def getSources():
|
||||
SdrService.loadProps()
|
||||
SdrService._loadProps()
|
||||
for id in SdrService.sdrProps.keys():
|
||||
if not id in SdrService.sources:
|
||||
props = SdrService.sdrProps[id]
|
||||
|
Loading…
Reference in New Issue
Block a user