lib/avahi/Client: free the AvahiClient on AVAHI_CLIENT_FAILURE
Previously the AvahiClient was only freed when AVAHI_ERR_DISCONNECTED was detected, but all other error conditions would lead to a memory leak.
This commit is contained in:
parent
f85629afa6
commit
9a7a49350c
@ -57,6 +57,8 @@ Client::ClientCallback(AvahiClient *c, AvahiClientState state) noexcept
|
||||
|
||||
reconnect_timer.Schedule(std::chrono::seconds(10));
|
||||
} else {
|
||||
Close();
|
||||
|
||||
if (!error_handler.OnAvahiError(std::make_exception_ptr(MakeError(error,
|
||||
"Avahi connection error"))))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user