mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2025-12-19 06:47:43 +00:00
fix: discard incoming binary or text frame if we are shutting down to avoid deadlock (#84)
This commit is contained in:
@@ -141,6 +141,11 @@ int AudioPipe::lws_callback(struct lws *wsi,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ap->m_state == LWS_CLIENT_DISCONNECTING) {
|
||||
lwsl_notice("AudioPipe::lws_service_thread race condition: got incoming message while closing the connection.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lws_frame_is_binary(wsi)) {
|
||||
if (ap->is_bidirectional_audio_stream()) {
|
||||
ap->m_callback(ap->m_uuid.c_str(), ap->m_bugname.c_str(), AudioPipe::BINARY, NULL, (char *) in, len);
|
||||
|
||||
Reference in New Issue
Block a user