Delete download queue entry only if it contains the client.

This commit is contained in:
Andreas 2013-07-18 11:39:52 +02:00
parent 3dff73965e
commit 66eff922d8
1 changed files with 4 additions and 2 deletions

View File

@ -144,8 +144,10 @@ void OutgoingDataCreator::SendDataToClients(pb::remote::Message* msg) {
if (client->isDownloader()) {
if (client->State() != QTcpSocket::ConnectedState) {
clients_->removeAt(clients_->indexOf(client));
delete download_queue_.value(client);
download_queue_.remove(client);
if (download_queue_.contains(client)) {
delete download_queue_.value(client);
download_queue_.remove(client);
}
delete client;
}
continue;