From 1a23ec6abf148eedaa22c72932abb90936475dde Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 4 Sep 2025 08:48:32 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Verwende=20die=20korrekte=20Daemon-WebSo?= =?UTF-8?q?cket-URL=20f=C3=BCr=20die=20Verbindung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Änderung: - Die WebSocket-Verbindung verwendet jetzt die Variable `daemonUrl`, die entweder den Wert von `VITE_DAEMON_SOCKET` oder einen Standardwert hat. Dies verbessert die Flexibilität und stellt sicher, dass die Verbindung auch bei fehlender Umgebungsvariable funktioniert. Diese Anpassung sorgt dafür, dass die WebSocket-Verbindung stabiler und zuverlässiger ist. --- frontend/src/store/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index dc24c62..d15a3e5 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -128,9 +128,10 @@ const store = createStore({ if (currentDaemonSocket) { currentDaemonSocket.disconnect(); } - console.log('🔌 Initializing Daemon WebSocket connection to:', import.meta.env.VITE_DAEMON_SOCKET); + const daemonUrl = import.meta.env.VITE_DAEMON_SOCKET || 'wss://www.your-part.de:4551'; + console.log('🔌 Initializing Daemon WebSocket connection to:', daemonUrl); try { - const daemonSocket = new WebSocket(import.meta.env.VITE_DAEMON_SOCKET, 'yourpart-protocol'); + const daemonSocket = new WebSocket(daemonUrl, 'yourpart-protocol'); daemonSocket.onopen = () => { console.log('✅ Daemon WebSocket connected successfully');