if connection to mpd is lost, change mpd state to unknown
This commit is contained in:
@@ -1303,7 +1303,14 @@ int MPD::Connection::CheckForErrors()
|
|||||||
itsMaxPlaylistLength = 0;
|
itsMaxPlaylistLength = 0;
|
||||||
}
|
}
|
||||||
if (!mpd_connection_clear_error(itsConnection))
|
if (!mpd_connection_clear_error(itsConnection))
|
||||||
|
{
|
||||||
Disconnect();
|
Disconnect();
|
||||||
|
// notify about mpd state changed to unknown.
|
||||||
|
StatusChanges changes;
|
||||||
|
changes.PlayerState = 1;
|
||||||
|
if (itsUpdater)
|
||||||
|
itsUpdater(this, changes, itsErrorHandlerUserdata);
|
||||||
|
}
|
||||||
if (itsErrorHandler)
|
if (itsErrorHandler)
|
||||||
itsErrorHandler(this, error_code, itsErrorMessage.c_str(), itsErrorHandlerUserdata);
|
itsErrorHandler(this, error_code, itsErrorMessage.c_str(), itsErrorHandlerUserdata);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user