mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse: don't add listener when connection failed
This commit is contained in:
parent
d677aeeeca
commit
cfeb724d58
1 changed files with 2 additions and 0 deletions
|
|
@ -1060,9 +1060,11 @@ int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t fla
|
||||||
if (c->core_proxy == NULL) {
|
if (c->core_proxy == NULL) {
|
||||||
context_fail(c, PA_ERR_CONNECTIONREFUSED);
|
context_fail(c, PA_ERR_CONNECTIONREFUSED);
|
||||||
res = -1;
|
res = -1;
|
||||||
|
goto exit;
|
||||||
}
|
}
|
||||||
pw_core_proxy_add_listener(c->core_proxy, &c->core_listener, &core_events, c);
|
pw_core_proxy_add_listener(c->core_proxy, &c->core_listener, &core_events, c);
|
||||||
|
|
||||||
|
exit:
|
||||||
pa_context_unref(c);
|
pa_context_unref(c);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue