mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
zeroconf-publish: Fix crash when avahi_client_new() fails
When the module is loaded and avahi_client_new() fails because the client cannot connect, a shutdown of the module is scheduled. In parallel, the client_callback is called with AVAHI_ERR_DISCONNECTED and another connection attempt is made which also fails and triggers a second unload of the module. This crashes PA, because there is already an unload in progress. This patch fixes the problem by checking if an unload is already scheduled. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/710>
This commit is contained in:
parent
5bba8ee621
commit
65889fbdee
1 changed files with 1 additions and 1 deletions
|
|
@ -645,7 +645,7 @@ static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offs
|
|||
|
||||
pa_assert(u);
|
||||
|
||||
if (u->shutting_down)
|
||||
if (u->shutting_down || u->module->unload_requested)
|
||||
return 0;
|
||||
|
||||
switch (code) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue