fix rusenie hier ked vsetkych odpoji
This commit is contained in:
1 parent
c4800fca0e
commit
7886b3a6b8
3 files changed
+51
-12
No files matched your search
@@ -132,6 +132,9 @@ export function setupSocketListeners() {
|
||||
|
||||
// Surface connection failures instead of silently buffering emits.
|
||||
socket.on('connect_error', (err: Error) => {
|
||||
// `active` = klient sa automaticky pokusi znova (typicky prebudeny mobil,
|
||||
// kym sa siet zobudi) -- prechodne, netreba strasit toastom.
|
||||
if (socket.active) return;
|
||||
useGameStore.getState().setError(`Spojenie so serverom zlyhalo: ${err.message}`);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user