Skip to content

Commit

Permalink
[Fix] 에러수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sseho committed Nov 5, 2024
1 parent 03c12b4 commit d1e6960
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/thread/ThreadComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -837,18 +837,19 @@ export default {
connect() {
this.sock = new SockJS(`${process.env.VUE_APP_API_BASE_URL}/ws-stomp`);
this.ws = Stomp.over(this.sock);
// this.ws.debug = null;
const authToken = localStorage.getItem('accessToken');
this.ws.connect(
{ Authorization: authToken },
(frame) => {
() => {
//console.log("frame: ", frame);
this.ws.subscribe(`/sub/chat/room/${this.roomId}`, (message) => {
const recv = JSON.parse(message.body);
this.recvMessage(recv);
});
},
(error) => {
() => {
//console.log(error);
if (this.reconnect++ <= 5) {
setTimeout(() => {
Expand Down

0 comments on commit d1e6960

Please sign in to comment.