public async Task<bool> Close(bool connectionproblem = false)
{
Debug.WriteLine(name + " : CLOSE");
queueInUse = idle = runQue = false;
sendQueue.Clear();
responseDictionary.Clear();
this.connectionproblem = connectionproblem;
if (_connection != null && !this.connectionproblem)
//await Send( MPDKeyWords.Send.Encode( MPDKeyWords.Client.Connection.CLOSE), false, true, false);
await Connection.Send(_connection.Socket,
MPDKeyWords.Send.Encode(MPDKeyWords.Client.Connection.CLOSE));
Connected = Connecting = false;
return true;
}