Skip to content

Commit ba97505

Browse files
committed
disconnect socket upon close
1 parent ddfe342 commit ba97505

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/src/pages/repo.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ export default function Repo() {
9696
);
9797
dispatch(wsActions.wsConnect());
9898
}
99+
return () => {
100+
console.log("disconnecting the socket ..");
101+
dispatch(wsActions.wsDisconnect());
102+
};
99103
}, [me]);
100104
useEffect(() => {
101105
dispatch(repoSlice.actions.resetState());

0 commit comments

Comments
 (0)