fix 100% CPU usage

This commit is contained in:
2026-08-27 16:01:31 +03:00
parent 0f7ec95d10
commit eb40fec59a
2 changed files with 2 additions and 1 deletions

View File

@@ -226,6 +226,7 @@ void server_run(sl_socktype_e type, const char *node, sl_tty_t *serial){
double tnow = 0., tweather = 0.;
int cmdclosed = 0;
while(s && s->connected){
usleep(100000);
tnow = sl_dtime();
if(!s->rthread){
LOGERR("Server handlers thread is dead");

View File

@@ -292,7 +292,7 @@ void runserver(int isunix, const char *node, int maxclients){
}
pthread_mutex_unlock(&Dome.mutex);
}else forbidden = 0;
usleep(1000);
usleep(10000);
if(!locksock->rthread){
WARNX("Server handlers thread is dead");
LOGERR("Server handlers thread is dead");