try to fix issues with logging in on linux
This commit is contained in:
@@ -232,17 +232,16 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
currentUsername = await getUsernameFromToken();
|
||||||
await connectSocket();
|
if (!currentUsername) {
|
||||||
currentUsername = currentUsername || await getUsernameFromToken();
|
showJoinError("User not authenticated.");
|
||||||
if (!currentUsername) {
|
|
||||||
showJoinError("User not authenticated.");
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Home authentication failed:", error);
|
|
||||||
showJoinError("Real-time poker connection failed.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connectSocket().catch((error) => {
|
||||||
|
console.error("Home WebSocket connection failed:", error);
|
||||||
|
showJoinError("Real-time poker connection failed.");
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const balanceRes = await fetch("/balance", {
|
const balanceRes = await fetch("/balance", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
|||||||
Reference in New Issue
Block a user