Terminate recently seen loop if cannot receive interrupts

It seems .abort() does not work on the recently seen loop
in some cases, e.g. if it is busy looping in a separate thread.

In my case after account reconfiguration recently seen loop
kept running and issuing warnings about closed interrupt channel.

Exit from recently seen loop on errors to avoid using 100% CPU
in such cases.
This commit is contained in:
link2xt
2023-01-18 10:48:22 +00:00
parent 42c709e7b1
commit de268b8225
2 changed files with 4 additions and 0 deletions

View File

@@ -1612,6 +1612,9 @@ impl RecentlySeenLoop {
context,
"Error receiving an interruption in recently seen loop: {}", err
);
// Maybe the sender side is closed.
// Terminate the loop to avoid looping indefinitely.
return;
}
Ok(Ok(RecentlySeenInterrupt {
contact_id,