From e2f01c5838f743a254628aaadcaefb35206630b3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 26 Feb 2018 12:26:12 +0100 Subject: [PATCH] protocol-native: disconnect remote Disconnect the node and all the streams instead of just changing the state. --- src/modules/module-protocol-native.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index 72ca0e8ba..a93a2b4d6 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -502,16 +502,10 @@ on_remote_data(void *data, int fd, enum spa_io mask) struct pw_core *core = pw_remote_get_core(this); if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { - enum pw_remote_state state; - pw_log_error("protocol-native %p: got connection error", impl); pw_loop_destroy_source(pw_core_get_main_loop(core), impl->source); impl->source = NULL; - if (mask & SPA_IO_HUP) - state = PW_REMOTE_STATE_UNCONNECTED; - else - state = PW_REMOTE_STATE_ERROR; - pw_remote_update_state(this, state, "connection error"); + pw_remote_disconnect(this); return; }