use of org.bff.javampd.exception.MPDResponseException in project openhab1-addons by openhab.
the class MpdBinding method disconnect.
/**
* Disconnects the player <code>playerId</code>
*
* @param playerId the id of the player to disconnect
*/
private void disconnect(String playerId) {
try {
MpdPlayerConfig playerConfig = playerConfigCache.get(playerId);
MPDStandAloneMonitor monitor = playerConfig.monitor;
if (monitor != null) {
monitor.stop();
}
MPD mpd = playerConfig.instance;
if (mpd != null) {
mpd.close();
}
} catch (MPDConnectionException ce) {
logger.warn("Couldn't disconnect player '{}'", playerId);
} catch (MPDResponseException re) {
logger.warn("Received response error: {}", re.getLocalizedMessage());
}
}
Aggregations