Added mpdIdleConnection.isConnected to the while loop