0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

modules/federation/sender: Recv timeout worker only calls cancel, not erase.

This commit is contained in:
Jason Volk 2018-03-14 18:09:01 -07:00
parent 7b2758a90d
commit ffafb70511

View file

@ -300,7 +300,7 @@ try
obj
};
log::debug
if(code != http::OK) log::warning
{
"%u %s from %s for %s",
ushort(code),
@ -363,15 +363,11 @@ recv_timeouts()
};
auto it(begin(txns));
while(it != end(txns))
for(; it != end(txns); ++it)
{
auto &txn(*it);
if(txn.timeout + seconds(15) < now) //TODO: conf
{
recv_timeout(txn);
it = txns.erase(it);
}
else ++it;
}
}
@ -388,5 +384,5 @@ recv_timeout(txn &txn)
txn.txnid
};
node.curtxn = nullptr;
cancel(txn);
}