mirror of
https://github.com/eddyem/small_tel.git
synced 2026-09-29 13:20:34 +03:00
fix 100% CPU usage
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user