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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user