skip can_read logic if empty

This commit is contained in:
smayzy 2026-04-27 13:51:26 +02:00
parent b4b748c042
commit b4dfc516fa

View File

@ -118,6 +118,8 @@ void read_can(Tel *t, int soc) {
struct can_frame frame;
int nbytes = read(soc, &frame, sizeof(struct can_frame));
if (nbytes < 0) return; // -1 EAGAIN means empty
if (nbytes > 0) {
switch (frame.can_id) {