modules: don't unload on stream errors

It's possible that the stream is sent an error when the session manager
can't link the node (because, for example, the sink/source is not
available yet). We should not stop but just log this error.

When the session manager actively kills the stream (when it is
reconnected while the DONT_RECONNECT flag is true) we will end up in the
UNCONNECTED state and that's when we can unload the module.
This commit is contained in:
Wim Taymans 2022-04-21 09:02:02 +02:00
parent f205a09ade
commit 01a7d6709b
3 changed files with 4 additions and 8 deletions

View file

@ -185,8 +185,7 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
pw_impl_module_schedule_destroy(impl->module);
break;
case PW_STREAM_STATE_ERROR:
pw_log_error("module %p: error: %s", impl, error);
pw_impl_module_schedule_destroy(impl->module);
pw_log_info("module %p: error: %s", impl, error);
break;
default:
break;