Get back "Cancel tiles also in wsd's senderqueue"
This reverts commit ec8b7bc012
.
Change-Id: I0a4f3f529c86522261085d4feec45e4b56a7e0e6
This commit is contained in:
parent
cfcf27ff1e
commit
f1a385be98
4 changed files with 17 additions and 0 deletions
|
@ -1001,6 +1001,11 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
|
|||
return forwardToClient(payload);
|
||||
}
|
||||
|
||||
void ClientSession::cancelTilesInQueue()
|
||||
{
|
||||
_senderQueue.cancelTiles();
|
||||
}
|
||||
|
||||
bool ClientSession::forwardToClient(const std::shared_ptr<Message>& payload)
|
||||
{
|
||||
if (isCloseFrame())
|
||||
|
|
|
@ -99,6 +99,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void cancelTilesInQueue();
|
||||
|
||||
/// Set the save-as socket which is used to send convert-to results.
|
||||
void setSaveAsSocket(const std::shared_ptr<StreamSocket>& socket)
|
||||
{
|
||||
|
|
|
@ -1448,6 +1448,7 @@ void DocumentBroker::cancelTileRequests(const std::shared_ptr<ClientSession>& se
|
|||
// Clear tile requests
|
||||
session->clearTilesOnFly();
|
||||
session->getRequestedTiles() = boost::none;
|
||||
session->cancelTilesInQueue();
|
||||
|
||||
session->clearTileSubscription();
|
||||
|
||||
|
|
|
@ -84,6 +84,15 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void cancelTiles()
|
||||
{
|
||||
std::remove_if(_queue.begin(), _queue.end(),
|
||||
[](const queue_item_t& cur)
|
||||
{
|
||||
return cur->firstToken() == "tile:";
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
/// Deduplicate messages based on the new one.
|
||||
/// Returns true if the new message should be
|
||||
|
|
Loading…
Reference in a new issue