Fix shutdown #9

Merged
snxraven merged 2 commits from MiTask/LinkUp-P2P-Chat:main into main 2024-06-14 04:44:10 -04:00
Showing only changes of commit 624222f726 - Show all commits

5
app.js
View File

@ -241,6 +241,11 @@ async function handleConnection(connection, info) {
} }
function retryConnection(topicBuffer) { function retryConnection(topicBuffer) {
if (!topicBuffer || !topicBuffer.buffer) {
console.error('Invalid topicBuffer:', topicBuffer);
return;
}
const topic = b4a.toString(topicBuffer, 'hex'); const topic = b4a.toString(topicBuffer, 'hex');
const room = activeRooms.find(room => room.topic === topic); const room = activeRooms.find(room => room.topic === topic);
if (room) { if (room) {