Skip to content

Commit

Permalink
fix: disconnect ws only on unmounted
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Sep 10, 2024
1 parent 33571f0 commit 5f09729
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const SendbirdChatProvider = ({

useEffect(() => {
return () => {
sdkInstance.disconnect().then(() => _setCurrentUser(undefined));
sdkInstance.disconnectWebSocket().then(() => _setCurrentUser(undefined));
};
}, [sdkInstance]);

Expand Down

0 comments on commit 5f09729

Please sign in to comment.