From 73a60d5c9c358e9d5c24aff2f605c3ab650fc74d Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Wed, 5 Feb 2020 23:34:00 -0800 Subject: [PATCH] uds: clear rx buffer on drain --- python/uds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/uds.py b/python/uds.py index ff58ae1e94..548f1bccea 100644 --- a/python/uds.py +++ b/python/uds.py @@ -303,6 +303,7 @@ def _recv_buffer(self, drain: bool=False) -> None: msgs = self.rx() if drain: if self.debug: print("CAN-RX: drain - {}".format(len(msgs))) + self.rx_buff.clear() else: for rx_addr, rx_ts, rx_data, rx_bus in msgs or []: if self._recv_filter(rx_bus, rx_addr) and len(rx_data) > 0: