Code

mpdclient: call mpdclient_lost_callback() after failed error recovery
authorMax Kellermann <max.kellermann@gmail.com>
Sun, 19 Mar 2017 11:47:53 +0000 (12:47 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Sun, 19 Mar 2017 12:03:57 +0000 (13:03 +0100)
src/mpdclient.c

index 6e6dd9948f6fa218e261246c7510ead26adac537..a4e165e9b249c419f96e4cace8903fd099126823 100644 (file)
@@ -141,8 +141,10 @@ mpdclient_handle_error(struct mpdclient *c)
        mpdclient_invoke_error_callback(error,
                                        mpd_connection_get_error_message(c->connection));
 
-       if (!mpd_connection_clear_error(c->connection))
+       if (!mpd_connection_clear_error(c->connection)) {
                mpdclient_disconnect(c);
+               mpdclient_lost_callback();
+       }
 
        return false;
 }