Session::auto_connect_thread_terminate() cannot use ::auto_connect_thread_wakeup() because that method is allowed to "fail".

Should fix hangs when closing a session with the ALSA backend (and perhaps others too).
This commit is contained in:
Paul Davis 2016-12-19 14:35:29 +00:00
parent ae6a5c95d7
commit 3d1eb9a6e5

View file

@ -7024,7 +7024,13 @@ Session::auto_connect_thread_terminate ()
}
}
auto_connect_thread_wakeup ();
/* cannot use auto_connect_thread_wakeup() because that is allowed to
* fail to wakeup the thread.
*/
pthread_mutex_lock (&_auto_connect_mutex);
pthread_cond_signal (&_auto_connect_cond);
pthread_mutex_unlock (&_auto_connect_mutex);
void *status;
pthread_join (_auto_connect_thread, &status);