mod/notification-matrix: only flush queue if fully connected

The fetch command is not as reliable as it should be... Chances were that
notifications were sent multiple times if stuck in background.
Let's flush only if fully connected - and hope this fixes it.
This commit is contained in:
Christian Hesse 2022-06-17 01:01:18 +02:00
parent d8d7ace5e5
commit cf59e7c1a2

View file

@ -13,8 +13,14 @@
:set FlushMatrixQueue do={
:global MatrixQueue;
:global IsFullyConnected;
:global LogPrintExit2;
:if ([ $IsFullyConnected ] = false) do={
$LogPrintExit2 debug $0 ("System is not fully connected, not flushing.") false;
:return false;
}
:local AllDone true;
:local QueueLen [ :len $MatrixQueue ];