0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 05:29:00 +02: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;
}