mirror of
https://github.com/craigerl/aprsd.git
synced 2026-03-03 05:30:11 -05:00
Sanity check around decoding packet
This adds another sanity try, except block at the APRSDClient level call for decode_packet, just in case the driver itself fails in it's decode_packet() call.
This commit is contained in:
parent
b9fea982f9
commit
58cb046b31
@ -138,4 +138,9 @@ class APRSDClient:
|
||||
return self.driver.consumer(callback=callback, raw=raw)
|
||||
|
||||
def decode_packet(self, *args, **kwargs) -> core.Packet:
|
||||
return self.driver.decode_packet(*args, **kwargs)
|
||||
try:
|
||||
packet = self.driver.decode_packet(*args, **kwargs)
|
||||
except Exception as e:
|
||||
LOG.error(f'Error decoding packet: {e}')
|
||||
return None
|
||||
return packet
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user