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);
|
itsConnection = mpd_newConnection(MPD_HOST.c_str(), MPD_PORT, MPD_TIMEOUT);
|
||||||
isConnected = 1;
|
isConnected = 1;
|
||||||
CheckForErrors();
|
if (CheckForErrors())
|
||||||
|
return false;
|
||||||
if (!MPD_PASSWORD.empty())
|
if (!MPD_PASSWORD.empty())
|
||||||
SendPassword();
|
SendPassword();
|
||||||
return !CheckForErrors();
|
return !CheckForErrors();
|
||||||
|
|||||||
Reference in New Issue
Block a user