2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-04 20:17:58 +00:00

Merge pull request #292 from Obihoernchen/fix/sdr-init-caching

Do not cache an SDR that failed to build
This commit is contained in:
Jarrod Johnson
2026-09-03 08:57:03 -04:00
committed by GitHub
+6 -2
View File
@@ -605,8 +605,12 @@ class Command(object):
if hasattr(self._oem, 'init_sdr'):
self._sdr = await self._oem.init_sdr()
else:
self._sdr = sdr.SDR(self, self._sdrcachedir)
await self._sdr.initialize()
# Assigned only once it is built. Assigning first meant a
# failed initialize left the half built object cached, and
# every later call returned that instead of retrying.
newsdr = sdr.SDR(self, self._sdrcachedir)
await newsdr.initialize()
self._sdr = newsdr
return self._sdr
async def get_event_constants(self):