From 8bb1ccf587febe4a8373e31e960a9dae308b1dfe Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 5 Dec 2019 11:32:51 +0100 Subject: [PATCH] protocol-native: emit a core error on disconnect Let the listeners on the core_proxy know about connection errors. --- src/modules/module-protocol-native.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index 6c54e26d6..62e9f94d5 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -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);