fix rusenie hier ked vsetkych odpoji

This commit is contained in:
tim committed 2026-07-03 19:16:41 +02:00
1 parent c4800fca0e
commit 7886b3a6b8
3 files changed
+51 -12

No files matched your search

+3
View File
@@ -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}`);
});
}