Fix MPD blocking when server error occurs by handling directly without blocking further execution by throwing

This commit is contained in:
Zaidhaan Hussain
2022-11-21 23:05:31 +08:00
parent 417d7172e5
commit d96e3e514d

View File

@@ -169,10 +169,7 @@ void PlaylistEditor::update()
}
catch (MPD::ServerError &e)
{
if (e.code() == MPD_SERVER_ERROR_SYSTEM) // no playlists directory
Statusbar::print(e.what());
else
throw;
Status::handleServerError(e);
}
if (idx < Playlists.size())
Playlists.resizeList(idx);