Skip to content

zeroconf-publish: Fix crash when avahi_client_new() fails

Georg Chini requested to merge gchini/pulseaudio:zeroconf_crash into master

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.

Merge request reports