MPD client: tolerate usage while disconnected
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:
		
							parent
							
								
									1642d387f3
								
							
						
					
					
						commit
						017cb1d570
					
				| @ -1594,6 +1594,8 @@ mpd_client_parse_kv (char *line, char **value) | |||||||
| static void | static void | ||||||
| mpd_client_update_poller (struct mpd_client *self) | mpd_client_update_poller (struct mpd_client *self) | ||||||
| { | { | ||||||
|  | 	if (self->state != MPD_CONNECTED) | ||||||
|  | 		return; | ||||||
| 	poller_fd_set (&self->socket_event, | 	poller_fd_set (&self->socket_event, | ||||||
| 		self->write_buffer.len ? (POLLIN | POLLOUT) : POLLIN); | 		self->write_buffer.len ? (POLLIN | POLLOUT) : POLLIN); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user