mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-28 17:19:44 +00:00
Fix WS error when switching from settings to traffic viewer (#985)
This commit is contained in:
parent
bbb44dae79
commit
4bc83ebcb5
@ -201,7 +201,9 @@ export const TrafficViewer: React.FC<TrafficViewerProps> = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
|
if (ws?.current?.readyState === WebSocket.OPEN) {
|
||||||
ws.current.close();
|
ws.current.close();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user