mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
net: improve request state consistency
This commit is contained in:
1 parent
82970608d4
commit
92613f5fbf
4 files changed
+63
-59
No files matched your search
@@ -137,7 +137,7 @@ NetworkEngine::processMessage(const uint8_t *buf, size_t buflen, const sockaddr
|
||||
if (reqp == requests.end())
|
||||
throw DhtProtocolException {DhtProtocolException::UNKNOWN_TID, "Can't find transaction", msg.id};
|
||||
auto req = reqp->second;
|
||||
if (req->cancelled)
|
||||
if (req->cancelled())
|
||||
return;
|
||||
|
||||
auto node = onNewNode(msg.id, from, fromlen, 2);
|
||||
@@ -164,7 +164,7 @@ NetworkEngine::processMessage(const uint8_t *buf, size_t buflen, const sockaddr
|
||||
if (not req->persistent)
|
||||
requests.erase(reqp);
|
||||
req->reply_time = scheduler.time();
|
||||
req->completed = true;
|
||||
req->completed_ = true;
|
||||
req->on_done(req, std::move(msg));
|
||||
if (not req->persistent)
|
||||
req->clear();
|
||||
|
||||
Reference in new issue
Block a user