exit if connection to mpd cannot be estabilished

This commit is contained in:
unknown
2008-08-24 16:55:02 +02:00
parent f61847c46c
commit 6ca6d47104

View File

@@ -52,7 +52,8 @@ bool MPDConnection::Connect()
{
itsConnection = mpd_newConnection(MPD_HOST.c_str(), MPD_PORT, MPD_TIMEOUT);
isConnected = 1;
CheckForErrors();
if (CheckForErrors())
return false;
if (!MPD_PASSWORD.empty())
SendPassword();
return !CheckForErrors();