close sensors when it's done (#1367)

old-commit-hash: 24495a2278
This commit is contained in:
Dean Lee
2020-04-18 06:52:40 +08:00
committed by GitHub
parent a072639865
commit 7f561f2d3d
2 changed files with 2 additions and 2 deletions

View File

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

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: