pulse-server: disconnect from server on EPROTO

If we get EPROTO, we likely have missed on some messages from the
server, and our state is now out of sync.

It's likely we can't recover (e.g. if error is due to fd limit hit), so
just drop the server connection in this case, similarly as if we got
EPIPE.
This commit is contained in:
Pauli Virtanen 2026-01-31 17:27:24 +02:00 committed by Wim Taymans
parent f34a87fe38
commit a50e9a995e

View file

@ -718,7 +718,7 @@ static void on_core_error(void *data, uint32_t id, int seq, int res, const char
{ {
struct manager *m = data; struct manager *m = data;
if (id == PW_ID_CORE && res == -EPIPE) { if (id == PW_ID_CORE && (res == -EPIPE || res == -EPROTO)) {
pw_log_debug("connection error: %d, %s", res, message); pw_log_debug("connection error: %d, %s", res, message);
manager_emit_disconnect(m); manager_emit_disconnect(m);
} }