Skip to content

Commit 72489e6

Browse files
committed
refactor: 피드백 반영
1 parent 51b41a4 commit 72489e6

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
66
import { AuthProvider } from '@/context/AuthContext';
77
import { ToastContainer } from 'react-toastify';
88
import { ErrorBoundary } from 'react-error-boundary';
9-
import ErrorComponent from './components/error/ErrorComponent';
10-
import { WebSocketProvider } from './context/WebSocketContext';
9+
import ErrorComponent from '@/components/error/ErrorComponent';
10+
import { WebSocketProvider } from '@/context/WebSocketContext';
1111

1212
const App = () => {
1313
return (

src/context/WebSocketContext.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ export const WebSocketProvider: React.FC<WebSocketProviderProps> = ({ children }
177177
pendingDisconnectTimerRef.current = window.setTimeout(async () => {
178178
pendingDisconnectTimerRef.current = null;
179179
if (destinationEntriesRef.current.size === 0) {
180-
await disconnect();
180+
try {
181+
await disconnect();
182+
} catch {
183+
showToastErrorMessage(SYSTEM_MESSAGES.DEFAULT_ERROR_MESSAGES.NETWORK_ERROR);
184+
}
181185
}
182186
}, NO_SUBS_GRACE_MS);
183187
}

src/hooks/useChatRead.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const useChatRead = () => {
5959
}, [connectWebSocket, subscribe, onUnread, onRead]);
6060

6161
useEffect(() => {
62-
initializeConnection();
62+
void initializeConnection();
6363

6464
return () => {
6565
unsubscribe(UNREAD_TOPIC);

0 commit comments

Comments
 (0)