0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd:Ⓜ️:typing: Manage interruptions during the timeout loop.

This commit is contained in:
Jason Volk 2020-05-12 03:22:33 -07:00
parent de0b1d9b33
commit fd35d6fb68

View file

@ -131,6 +131,7 @@ void
ircd::m::typing::timeout_check()
try
{
const ctx::uninterruptible ui;
const auto now
{
ircd::now<system_point>()
@ -140,10 +141,9 @@ try
{
if(it->timesout < now)
{
// have to restart the loop if there's a timeout because
// the call will have yields and invalidate iterators etc.
timeout_timeout(*it);
it = typists.erase(it);
ctx::interruption_point();
}
else ++it;
}