[misc] Centralize thread naming plus name websocket thread

This commit is contained in:
ejurgensen
2021-07-05 21:40:31 +02:00
parent eae09039d5
commit d2f4efa1bf
13 changed files with 33 additions and 83 deletions

View File

@@ -19,12 +19,10 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <json.h>
#include <libwebsockets.h>
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
# include <pthread_np.h>
#endif
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -34,6 +32,7 @@
#include "conffile.h"
#include "listener.h"
#include "logger.h"
#include "misc.h"
static struct lws_context *context;
@@ -523,6 +522,8 @@ websocket_init(void)
return -1;
}
thread_setname(tid_websocket, "websocket");
return 0;
}