MT#55283 remove obsolete lock

Ref #2206

Change-Id: Idbbea763718d899e86a5036309a3fe079adbd28f
pull/2157/merge
Richard Fuchs 2 weeks ago
parent d4bc7fd95c
commit ff1f8d85c9

@ -67,7 +67,6 @@ static GThreadPool *websocket_threads;
// consumes this queue after lws_service() returns.
static GQueue websocket_pending_writes;
static mutex_t websocket_callback_lock = MUTEX_STATIC_INIT;
static mutex_t websocket_service_lock = MUTEX_STATIC_INIT;
static struct websocket_message *websocket_message_new(struct websocket_conn *wc) {
@ -1319,14 +1318,10 @@ err:
static void websocket_loop(void *p) {
ilogs(http, LOG_INFO, "Websocket listener thread running");
while (!rtpe_shutdown) {
// see websocket_write_raw() for locking logic
mutex_lock(&websocket_service_lock);
lws_service(websocket_context, 100);
// Flush only after LWS has exited its callbacks and is not
// holding the connection cleanup path.
websocket_flush_write_notifications();
mutex_unlock(&websocket_service_lock);
}
websocket_cleanup();

Loading…
Cancel
Save