diff --git a/extension/background.js b/extension/background.js index 19ea3dc..89a3ec9 100644 --- a/extension/background.js +++ b/extension/background.js @@ -1571,6 +1571,7 @@ async function handleAsyncMessage(message, sender, sendResponse) { for (const tab of tabs) { chrome.tabs.sendMessage(tab.id, { type: 'JOIN_STATUS', success: true, message: 'Already in room' }).catch(() => {}); } + sendResponse({ status: 'already_joined' }); return; } diff --git a/extension/popup.js b/extension/popup.js index 3a76b5d..d1b9ebf 100644 --- a/extension/popup.js +++ b/extension/popup.js @@ -1222,6 +1222,8 @@ elements.joinBtn.addEventListener('click', async () => { showError(getMessage('ERR_INVALID_SERVER_URL')); elements.joinBtn.disabled = false; elements.joinBtn.textContent = getMessage('BTN_JOIN_ROOM'); + if (joinBtnTimeout) { clearTimeout(joinBtnTimeout); joinBtnTimeout = null; } + isProcessingConnection = false; return; } if (useCustom && serverUrl) { @@ -1232,6 +1234,7 @@ elements.joinBtn.addEventListener('click', async () => { showError(getMessage('ERR_INVALID_SERVER_URL')); elements.joinBtn.disabled = false; elements.joinBtn.textContent = getMessage('BTN_JOIN_ROOM'); + if (joinBtnTimeout) { clearTimeout(joinBtnTimeout); joinBtnTimeout = null; } isProcessingConnection = false; return; }