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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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