exit if connection to mpd cannot be estabilished
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user