diff --git a/can/interfaces/socketcand/socketcand.py b/can/interfaces/socketcand/socketcand.py index 8b55eef3a..5a1f2570d 100644 --- a/can/interfaces/socketcand/socketcand.py +++ b/can/interfaces/socketcand/socketcand.py @@ -191,9 +191,7 @@ def _recv_internal(self, timeout): self.__message_buffer.append(parsed_can_message) buffer_view = buffer_view[end + 1 :] - self.__receive_buffer = self.__receive_buffer[ - chars_processed_successfully + 1 : - ] + self.__receive_buffer = self.__receive_buffer[chars_processed_successfully:] can_message = ( None if len(self.__message_buffer) == 0