Skip to content

Commit b61b014

Browse files
committed
websocket hot fix
1 parent 671129f commit b61b014

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/features/game/multiplayer/shared/services/websocket/composables

src/features/game/multiplayer/shared/services/websocket/composables/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const connectionCallbacks = ref(new Set());
1818
* @param {String} endpoint - WebSocket 서버 엔드포인트
1919
* @param {Function} onConnectCallback - 연결 성공 시 실행할 콜백 함수
2020
*/
21-
const connect = (endpoint = "/ws", onConnectCallback = null) => {
21+
const connect = (endpoint = "/api/ws", onConnectCallback = null) => {
2222
// 기존 연결이 있는 경우 정리 (새로고침 시 중복 연결 방지)
2323
if (stompClient.value && !isConnected.value) {
2424
try {
@@ -56,7 +56,7 @@ const connect = (endpoint = "/ws", onConnectCallback = null) => {
5656
} else {
5757
// 프로덕션 환경: 환경 변수 또는 현재 호스트 사용
5858
if (process.env.VUE_APP_WS_URL) {
59-
wsUrl = `${process.env.VUE_APP_WS_URL}/${endpoint}`;
59+
wsUrl = `${process.env.VUE_APP_WS_URL}${endpoint}`;
6060
} else {
6161
// 환경 변수가 없으면 현재 페이지의 호스트 사용
6262
wsUrl = `${window.location.protocol}//${window.location.host}${endpoint}`;

0 commit comments

Comments
 (0)