Skip to content

Commit

Permalink
Wake up the lws loop when destroying the WebSocket transport.
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Jul 14, 2021
1 parent 4c6d42c commit eb5b20a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transports/janus_websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,9 @@ void janus_websockets_destroy(void) {
if(!g_atomic_int_get(&initialized))
return;
g_atomic_int_set(&stopping, 1);
#if ((LWS_LIBRARY_VERSION_MAJOR == 3 && LWS_LIBRARY_VERSION_MINOR >= 2) || LWS_LIBRARY_VERSION_MAJOR >= 4)
lws_cancel_service(wsc);
#endif

/* Stop the service thread */
if(ws_thread != NULL) {
Expand Down

0 comments on commit eb5b20a

Please sign in to comment.