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:
parent
de0b1d9b33
commit
fd35d6fb68
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue