From a23160f35ccab48ebc06d56741af5f803d67c3a9 Mon Sep 17 00:00:00 2001 From: Song367 <601337784@qq.com> Date: Wed, 6 Aug 2025 01:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AD=89=E5=BE=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index d4c9ce6..02f560b 100644 --- a/src/index.js +++ b/src/index.js @@ -914,9 +914,11 @@ class WebRTCChat { this.videoContainer.classList.remove('calling'); } - // 直接刷新页面清除所有缓存 - console.log('通话已结束,正在刷新页面清除缓存...'); - window.location.reload(); + // 延迟刷新,确保服务器处理完断开逻辑 + console.log('通话已结束,5秒后刷新页面清除缓存...'); + setTimeout(() => { + window.location.reload(); + }, 2000); } // 清除视频缓存的方法