remove pthread_kill/pthread_cancel from signals (if thread wasn't run, these functions cause segfault)

This commit is contained in:
2025-08-12 11:48:48 +03:00
parent 22097610f9
commit e59f9a05b2
4 changed files with 4 additions and 4 deletions

View File

@@ -593,7 +593,7 @@ void closeSerial(){
DBG("close encoder's fd");
close(encfd[0]);
encfd[0] = -1;
if(Conf.SepEncoder == 2){
if(Conf.SepEncoder == 2 && encfd[1] > -1){
close(encfd[1]);
encfd[1] = -1;
}