diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index f0893c4b..f13e454c 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -109,7 +109,9 @@ export const ActiveCall: FC = (props) => { useEffect(() => { return () => { - livekitRoom?.disconnect(); + if (connState === ConnectionState.Connected) { + livekitRoom?.disconnect(); + } }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -381,7 +383,13 @@ export const InCallView: FC = ({ } buttons.push( - , + , ); footer = (