aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-06-17 01:01:18 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-06-20 11:29:49 +0200
commitcf59e7c1a213a2ce45a48344deda2897dc5db1e4 (patch)
tree2a1fd01ad26999fb2c8e683616019c453e35da20
parentd8d7ace5e54a6fdcc38eeb38ca2da15bb716694f (diff)
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.
-rw-r--r--mod/notification-matrix6
1 files changed, 6 insertions, 0 deletions
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 ];