# libtmux._internal.control_mode.ControlMode.__exit__

- **Module:** libtmux._internal.control_mode
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/_internal/control_mode.py#L129
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-_internal-control_mode-controlmode-__exit__/

```
libtmux._internal.control_mode.ControlMode.__exit__(
    self,
    exc_type: type[BaseException] | None,
    exc_val: BaseException | None,
    exc_tb: types.TracebackType | None,
) -> None
```

Terminate control-mode client.

## Parameters

- `exc_type` (`type[BaseException] | None`)
- `exc_val` (`BaseException | None`)
- `exc_tb` (`types.TracebackType | None`)
