From cf59e7c1a213a2ce45a48344deda2897dc5db1e4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 17 Jun 2022 01:01:18 +0200 Subject: 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. --- mod/notification-matrix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod') diff --git a/mod/notification-matrix b/mod/notification-matrix index 8a74a1c..f905839 100644 --- a/mod/notification-matrix +++ b/mod/notification-matrix @@ -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 ]; -- cgit v1.2.3-70-g09d2