mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
network_engine: always erase partial message after processing
This commit is contained in:
1 parent
12cb93f9cf
commit
08e9f0b763
1 file changed
+2
-1
@@ -298,6 +298,7 @@ NetworkEngine::clear()
|
||||
request.second->node->setExpired();
|
||||
}
|
||||
requests.clear();
|
||||
partial_messages.clear();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -487,10 +488,10 @@ NetworkEngine::processMessage(const uint8_t* buf, size_t buflen, SockAddr f)
|
||||
try {
|
||||
// process the full message
|
||||
process(std::move(pmsg_it->second.msg), from);
|
||||
partial_messages.erase(pmsg_it);
|
||||
} catch (...) {
|
||||
return;
|
||||
}
|
||||
partial_messages.erase(pmsg_it);
|
||||
} else
|
||||
scheduler.add(now + RX_TIMEOUT, std::bind(&NetworkEngine::maintainRxBuffer, this, msg->tid));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user