Skip to content

Commit

Permalink
Merge pull request #9 from scs/bugfix/hdlc_dlms_parsing
Browse files Browse the repository at this point in the history
clear also dlms data buffer if hdlc buffer gets too large
  • Loading branch information
raymar9 authored Sep 13, 2021
2 parents dc2b5f0 + 5dee206 commit 4523a82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smartmeter_datacollector/smartmeter/hdlc_dlms_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def append_to_hdlc_buffer(self, data: bytes) -> None:
LOGGER.warning("HDLC byte-buffer > %i. Buffer is cleared, some data is lost.",
self.HDLC_BUFFER_MAX_SIZE)
self._hdlc_buffer.clear()
self._dlms_data.clear()
self._hdlc_buffer.set(data)

def clear_hdlc_buffer(self) -> None:
Expand Down

0 comments on commit 4523a82

Please sign in to comment.