Skip to content

Commit

Permalink
Reconnect when disabling split tunneling from dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
olmoh authored and hulthe committed Dec 18, 2024
1 parent 738b40c commit 64828f6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface IProps {
}

export default function NotificationArea(props: IProps) {
const { showFullDiskAccessSettings } = useAppContext();
const { showFullDiskAccessSettings, reconnectTunnel } = useAppContext();

const account = useSelector((state: IReduxState) => state.account);
const locale = useSelector((state: IReduxState) => state.userInterface.locale);
Expand Down Expand Up @@ -80,7 +80,8 @@ export default function NotificationArea(props: IProps) {
const disableSplitTunneling = useCallback(async () => {
setIsModalOpen(false);
await setSplitTunnelingState(false);
}, [setSplitTunnelingState]);
await reconnectTunnel();
}, [reconnectTunnel, setSplitTunnelingState]);

const notificationProviders: InAppNotificationProvider[] = [
new ConnectingNotificationProvider({ tunnelState }),
Expand Down

0 comments on commit 64828f6

Please sign in to comment.