mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
small fix when reconnecting to the game
This commit is contained in:
@@ -28,6 +28,11 @@ const Game = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useEvent("disconnect", () => {
|
||||||
|
// Force reconnection attempt and re-emit player reconnect once socket is back
|
||||||
|
socket?.connect()
|
||||||
|
})
|
||||||
|
|
||||||
useEvent(
|
useEvent(
|
||||||
"player:successReconnect",
|
"player:successReconnect",
|
||||||
({ gameId, status, player, currentQuestion }) => {
|
({ gameId, status, player, currentQuestion }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user