MPD client: tolerate usage while disconnected
All checks were successful
Alpine 3.20 Success
OpenBSD 7.5 Success

If the client is password-protected, this will not automagically
make queued up commands work, but it's better than hitting
the poller assertion.
This commit is contained in:
Přemysl Eric Janouch 2025-01-08 08:07:38 +01:00
parent 1642d387f3
commit 017cb1d570
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -1594,6 +1594,8 @@ mpd_client_parse_kv (char *line, char **value)
static void
mpd_client_update_poller (struct mpd_client *self)
{
if (self->state != MPD_CONNECTED)
return;
poller_fd_set (&self->socket_event,
self->write_buffer.len ? (POLLIN | POLLOUT) : POLLIN);
}