set new state State.received

This commit is contained in:
Stefan Allius
2024-06-16 22:45:13 +02:00
parent d14cbe87a2
commit f4b434cfef
2 changed files with 6 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ class Talent(Message):
if self.header_valid and len(self._recv_buffer) >= (self.header_len +
self.data_len):
if self.state == State.init:
self.state = State.received
log_lvl = self.log_lvl.get(self.msg_id, logging.WARNING)
if callable(log_lvl):
log_lvl = log_lvl()