Skip to content

Commit

Permalink
fix(#63): 채팅방 나가지는 에러
Browse files Browse the repository at this point in the history
  • Loading branch information
uiop5809 committed Sep 4, 2024
1 parent 53814a4 commit f4f682c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/hooks/useSocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React, {
useContext,
useRef,
useState,
useEffect,
useMemo,
} from 'react'

Expand Down Expand Up @@ -68,14 +67,6 @@ export const WebSocketProvider = ({ children }: any) => {
return connectedKeys.has(key)
}

useEffect(() => {
return () => {
Object.keys(socketRefs.current).forEach((key) => {
socketRefs.current[key]?.close()
})
}
}, [])

const value = useMemo(
() => ({
socketRefs: socketRefs.current,
Expand Down

0 comments on commit f4f682c

Please sign in to comment.