[web] Fix possible invalid read during shutdown

The player may emit a listener event when shutting down, and since websockets
didn't remove it's listener callback it would receive an event despite being
deinitialized. This would lead to an invalid read by lws_cancel_service in
listener_cb().
This commit is contained in:
ejurgensen 2023-12-29 17:34:48 +01:00
parent c28d108b96
commit e03120c944
1 changed files with 2 additions and 0 deletions

View File

@ -429,6 +429,8 @@ websocket(void *arg)
#endif
}
listener_remove(listener_cb);
pthread_exit(NULL);
}