From e39688daddbc8cced810a9c8c518395ed2ce7b45 Mon Sep 17 00:00:00 2001 From: Shekhar Wagh Date: Tue, 3 Mar 2026 13:08:31 +0530 Subject: [PATCH] RTC: Increase awareness timeout to avoid false disconnects The 30 s awareness timeout matched the background-tab polling interval exactly, causing awareness entries to expire between polls and triggering false "X has left" notifications that resolved on the next poll cycle. Increase to 70 s to comfortably exceed the polling interval. The value accounts for Chrome's intensive throttling which can delay background tab timers to ~60 s --- .../collaboration/class-wp-http-polling-sync-server.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/collaboration/class-wp-http-polling-sync-server.php b/src/wp-includes/collaboration/class-wp-http-polling-sync-server.php index 533b23fdb4e34..9451e8a7a4fca 100644 --- a/src/wp-includes/collaboration/class-wp-http-polling-sync-server.php +++ b/src/wp-includes/collaboration/class-wp-http-polling-sync-server.php @@ -24,10 +24,16 @@ class WP_HTTP_Polling_Sync_Server { * Awareness timeout in seconds. Clients that haven't updated * their awareness state within this time are considered disconnected. * + * Background tabs poll every 30 s, but Chrome's intensive throttling + * (after ~5 min in background) can delay polls to ~60 s. The timeout + * must exceed that to avoid false disconnects. + * + * @see https://developer.chrome.com/blog/timer-throttling-in-chrome-88 + * * @since 7.0.0 * @var int */ - const AWARENESS_TIMEOUT = 30; + const AWARENESS_TIMEOUT = 70; /** * Threshold used to signal clients to send a compaction update.