mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Fix websocket reconnecting
This commit is contained in:
@@ -4246,9 +4246,11 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
args.params.type === 'friend' &&
|
args.params.type === 'friend' &&
|
||||||
$app.localFavoriteFriendsGroups.includes("friend:" + args.params.tags)
|
$app.localFavoriteFriendsGroups.includes(
|
||||||
) {
|
'friend:' + args.params.tags
|
||||||
|
)
|
||||||
|
) {
|
||||||
$app.updateLocalFavoriteFriends();
|
$app.updateLocalFavoriteFriends();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -5317,6 +5319,15 @@ speechSynthesis.getVoices();
|
|||||||
if ($app.debugWebSocket) {
|
if ($app.debugWebSocket) {
|
||||||
console.log('WebSocket closed');
|
console.log('WebSocket closed');
|
||||||
}
|
}
|
||||||
|
workerTimers.setTimeout(() => {
|
||||||
|
if (
|
||||||
|
this.isLoggedIn &&
|
||||||
|
$app.friendLogInitStatus &&
|
||||||
|
this.webSocket === null
|
||||||
|
) {
|
||||||
|
this.getAuth();
|
||||||
|
}
|
||||||
|
}, 5000);
|
||||||
};
|
};
|
||||||
socket.onerror = () => {
|
socket.onerror = () => {
|
||||||
if (this.errorNoty) {
|
if (this.errorNoty) {
|
||||||
@@ -5375,7 +5386,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
API.reconnectWebSocket = function () {
|
API.reconnectWebSocket = function () {
|
||||||
if (!$app.friendLogInitStatus) {
|
if (!this.isLoggedIn || !$app.friendLogInitStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.closeWebSocket();
|
this.closeWebSocket();
|
||||||
@@ -8320,6 +8331,7 @@ speechSynthesis.getVoices();
|
|||||||
}).show();
|
}).show();
|
||||||
}
|
}
|
||||||
this.isLoggedIn = false;
|
this.isLoggedIn = false;
|
||||||
|
$app.friendLogInitStatus = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
API.$on('LOGIN', function (args) {
|
API.$on('LOGIN', function (args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user