protocol-native: emit a core error on disconnect

Let the listeners on the core_proxy know about connection errors.
This commit is contained in:
Wim Taymans 2019-12-05 11:32:51 +01:00
parent 7594eabdc8
commit 8bb1ccf587

View file

@ -667,6 +667,9 @@ on_remote_data(void *data, int fd, uint32_t mask)
return;
error:
pw_log_error(NAME" %p: got connection error %d (%s)", impl, res, spa_strerror(res));
pw_proxy_notify((struct pw_proxy*)this->core_proxy,
struct pw_core_proxy_events, error, 0, 0,
this->recv_seq, res, "connection error");
pw_loop_destroy_source(pw_core_get_main_loop(core), impl->source);
impl->source = NULL;
pw_remote_disconnect(this);