Skip to content

Commit 44c2367

Browse files
committed
fix: use same port for WebSocket connections instead of port+1
1 parent 82f5466 commit 44c2367

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

public/js/views/chat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ async function connect() {
385385
// Create the WebSocket URL
386386
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
387387
// Use port + 1 for WebSocket connections (the separate WebSocket server)
388-
const wsPort = parseInt(window.location.port || '80') + 1;
388+
const wsPort = parseInt(window.location.port || '80');
389389
const wsUrl = `${wsProtocol}//${host}:${wsPort}`;
390390

391391
addSystemMessage(`Connecting to ${wsUrl}...`);

0 commit comments

Comments
 (0)