fix(chat): rejoin match room after socket reconnection
This commit is contained in:
@@ -72,6 +72,7 @@ const useMatchChat = (match, userId, slug) => {
|
|||||||
// Handle reconnection
|
// Handle reconnection
|
||||||
socket.on('reconnect', (attemptNumber) => {
|
socket.on('reconnect', (attemptNumber) => {
|
||||||
console.log('🔄 Match chat reconnected after', attemptNumber, 'attempts');
|
console.log('🔄 Match chat reconnected after', attemptNumber, 'attempts');
|
||||||
|
joinMatchRoom(); // Re-join room after reconnection
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('reconnect_attempt', (attemptNumber) => {
|
socket.on('reconnect_attempt', (attemptNumber) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user