From cc1e906825dd30f74d0a30190a7dd2a26d6b1642 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Dec 2013 23:54:46 -0800 Subject: generate a small amount of entropy to avoid duplicate notifications from essentially simultaneous deliveries. --- include/enotify.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/enotify.php b/include/enotify.php index 808efef51..011a1cde2 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -4,6 +4,10 @@ function notification($params) { logger('notification: entry', LOGGER_DEBUG); + // throw a small amount of entropy into the system to breakup duplicates arriving at the same precise instant. + usleep(mt_rand(0,10000)); + + $a = get_app(); -- cgit v1.2.3