close sensors when it's done (#1367)

This commit is contained in:
Dean Lee
2020-04-18 06:52:40 +08:00
committed by GitHub
parent 15f57c4c22
commit 24495a2278
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ void sensor_loop() {
break;
}
}
sensors_close(device);
delete sensor_events_sock;
delete c;
}
+1 -1
View File
@@ -911,7 +911,7 @@ static void* light_sensor_thread(void *args) {
s->light_sensor = buffer[0].light;
}
}
sensors_close(device);
return NULL;
fail: