mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
protocol-native: disconnect remote
Disconnect the node and all the streams instead of just changing the state.
This commit is contained in:
parent
6f61ac9357
commit
e2f01c5838
1 changed files with 1 additions and 7 deletions
|
|
@ -502,16 +502,10 @@ on_remote_data(void *data, int fd, enum spa_io mask)
|
||||||
struct pw_core *core = pw_remote_get_core(this);
|
struct pw_core *core = pw_remote_get_core(this);
|
||||||
|
|
||||||
if (mask & (SPA_IO_ERR | SPA_IO_HUP)) {
|
if (mask & (SPA_IO_ERR | SPA_IO_HUP)) {
|
||||||
enum pw_remote_state state;
|
|
||||||
|
|
||||||
pw_log_error("protocol-native %p: got connection error", impl);
|
pw_log_error("protocol-native %p: got connection error", impl);
|
||||||
pw_loop_destroy_source(pw_core_get_main_loop(core), impl->source);
|
pw_loop_destroy_source(pw_core_get_main_loop(core), impl->source);
|
||||||
impl->source = NULL;
|
impl->source = NULL;
|
||||||
if (mask & SPA_IO_HUP)
|
pw_remote_disconnect(this);
|
||||||
state = PW_REMOTE_STATE_UNCONNECTED;
|
|
||||||
else
|
|
||||||
state = PW_REMOTE_STATE_ERROR;
|
|
||||||
pw_remote_update_state(this, state, "connection error");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue