close sensors when it's done (#1367)

pull/1392/head
Dean Lee 5 years ago committed by GitHub
parent 15f57c4c22
commit 24495a2278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/sensord/sensors.cc
  2. 2
      selfdrive/ui/ui.cc

@ -225,7 +225,7 @@ void sensor_loop() {
break; break;
} }
} }
sensors_close(device);
delete sensor_events_sock; delete sensor_events_sock;
delete c; delete c;
} }

@ -911,7 +911,7 @@ static void* light_sensor_thread(void *args) {
s->light_sensor = buffer[0].light; s->light_sensor = buffer[0].light;
} }
} }
sensors_close(device);
return NULL; return NULL;
fail: fail:

Loading…
Cancel
Save