MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / acknowledgmentWaitingTimerOnTimer

Method acknowledgmentWaitingTimerOnTimer

src/network/ProtocolClient.cpp:249–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 }
248
249 void ProtocolClient::acknowledgmentWaitingTimerOnTimer() {
250 QMutexLocker lock(&acknowledgmentWaitingMutex);
251 if (acknowledgmentWaitingMessages.size() > 0) {
252 QDateTime const now = QDateTime::currentDateTime();
253 QHash<openmittsu::protocol::MessageId, std::shared_ptr<openmittsu::acknowledgments::AcknowledgmentProcessor>>::iterator i = acknowledgmentWaitingMessages.begin();
254 QHash<openmittsu::protocol::MessageId, std::shared_ptr<openmittsu::acknowledgments::AcknowledgmentProcessor>>::iterator end = acknowledgmentWaitingMessages.end();
255 while (i != end) {
256 if (i.value()->getTimeoutTime() <= now) {
257 i.value()->sendFailedTimeout(this);
258
259 i = acknowledgmentWaitingMessages.erase(i);
260 } else {
261 ++i;
262 }
263 }
264 }
265 }
266
267 void ProtocolClient::keepAliveTimerOnTimer() {
268 if (!m_isConnected || !m_isAllowedToSend) {

Callers

nothing calls this directly

Calls 3

valueMethod · 0.80
sizeMethod · 0.45
sendFailedTimeoutMethod · 0.45

Tested by

no test coverage detected