Only get new notifications every 30 seconds in case of an error.
[Sone.git] / src / main / resources / static / javascript / sone.js
index a9a8c8f..e4992be 100644 (file)
@@ -473,8 +473,10 @@ function getNotifications() {
                        $.each(data.removedNotifications, function(index, value) {
                                $("#sone #notification-area .notification#" + value.id).slideUp();
                        });
+                       setTimeout(getNotifications, 5000);
+               } else {
+                       setTimeout(getNotifications, 30000);
                }
-               setTimeout(getNotifications, 5000);
        });
 }