mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
Merge pull request #1445 from whatdoineed2do/websocket-slow-shutdown
[web] slow 4.1.6 shutdown; request to cancel ws loop
This commit is contained in:
commit
176142f311
@ -429,7 +429,6 @@ websocket(void *arg)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
lws_context_destroy(context);
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,9 +540,11 @@ websocket_deinit(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
websocket_exit = true;
|
websocket_exit = true;
|
||||||
|
lws_cancel_service(context);
|
||||||
ret = pthread_join(tid_websocket, NULL);
|
ret = pthread_join(tid_websocket, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
DPRINTF(E_LOG, L_WEB, "Error joining websocket thread (%d): %s\n", ret, strerror(ret));
|
DPRINTF(E_LOG, L_WEB, "Error joining websocket thread (%d): %s\n", ret, strerror(ret));
|
||||||
|
|
||||||
|
lws_context_destroy(context);
|
||||||
pthread_mutex_destroy(&websocket_write_event_lock);
|
pthread_mutex_destroy(&websocket_write_event_lock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user