diff --git a/frontend/src/context/LobbyProvider.jsx b/frontend/src/context/LobbyProvider.jsx index 7b23a0a..692afe4 100644 --- a/frontend/src/context/LobbyProvider.jsx +++ b/frontend/src/context/LobbyProvider.jsx @@ -20,7 +20,13 @@ export const LobbyProvider = ({ lobbyId, initialUser, children }) => { }); const socket = useMemo( - () => io(import.meta.env.VITE_SOCKET_URL, { transports: ['websocket'] }), + () => + io(import.meta.env.VITE_SOCKET_URL, { + transports: ['websocket', 'polling'], + reconnection: true, + reconnectionDelay: 1000, + reconnectionAttempts: 5, + }), [], );