SubMaster: ensure msg is always a reader (#557)

* SubMaster: ensure msg is always a reader

* fix
This commit is contained in:
Adeeb Shihadeh
2023-12-01 22:36:37 -08:00
committed by GitHub
parent 65b34b4d15
commit 60d1ee0490

View File

@@ -187,7 +187,7 @@ class SubMaster:
except capnp.lib.capnp.KjException: # pylint: disable=c-extension-no-member
data = new_message(s, 0) # lists
self.data[s] = getattr(data, s)
self.data[s] = getattr(data.as_reader(), s)
self.logMonoTime[s] = 0
self.valid[s] = data.valid