Improve Socket.IO logging and connection handling

- Enhanced logging during WebSocket upgrade attempts by including specific headers for better debugging.
- Updated frontend socket service to allow forced upgrade attempts after successful polling connections, improving connection reliability.
This commit is contained in:
Torsten Schulz (local)
2025-12-01 08:14:26 +01:00
parent a651113dee
commit 5aa11151cf
2 changed files with 9 additions and 4 deletions

View File

@@ -85,14 +85,16 @@ export const connectSocket = (clubId) => {
reconnectionDelayMax: 5000,
reconnectionAttempts: Infinity, // Unbegrenzte Versuche
timeout: 20000,
upgrade: true,
upgrade: true, // Erlaube Upgrade von Polling zu WebSocket
forceNew: false,
secure: isHttps, // Nur für HTTPS
rejectUnauthorized: false, // Für selbst-signierte Zertifikate (nur Entwicklung)
// Verbesserte Cookie-Handling
withCredentials: true,
// Auto-Connect
autoConnect: true
autoConnect: true,
// Erzwinge Upgrade-Versuch nach erfolgreicher Polling-Verbindung
rememberUpgrade: true
});
socket.on('connect', () => {