mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
modules/federation/sender: Recv timeout worker only calls cancel, not erase.
This commit is contained in:
parent
7b2758a90d
commit
ffafb70511
1 changed files with 3 additions and 7 deletions
|
@ -300,7 +300,7 @@ try
|
||||||
obj
|
obj
|
||||||
};
|
};
|
||||||
|
|
||||||
log::debug
|
if(code != http::OK) log::warning
|
||||||
{
|
{
|
||||||
"%u %s from %s for %s",
|
"%u %s from %s for %s",
|
||||||
ushort(code),
|
ushort(code),
|
||||||
|
@ -363,15 +363,11 @@ recv_timeouts()
|
||||||
};
|
};
|
||||||
|
|
||||||
auto it(begin(txns));
|
auto it(begin(txns));
|
||||||
while(it != end(txns))
|
for(; it != end(txns); ++it)
|
||||||
{
|
{
|
||||||
auto &txn(*it);
|
auto &txn(*it);
|
||||||
if(txn.timeout + seconds(15) < now) //TODO: conf
|
if(txn.timeout + seconds(15) < now) //TODO: conf
|
||||||
{
|
|
||||||
recv_timeout(txn);
|
recv_timeout(txn);
|
||||||
it = txns.erase(it);
|
|
||||||
}
|
|
||||||
else ++it;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,5 +384,5 @@ recv_timeout(txn &txn)
|
||||||
txn.txnid
|
txn.txnid
|
||||||
};
|
};
|
||||||
|
|
||||||
node.curtxn = nullptr;
|
cancel(txn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue