# control.ControlEvents.shutdown

- **Module:** control.ControlEvents
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/control.rs#L1252
- **Page:** https://libtmux.org/en/rs/latest/reference/control-controlevents-shutdown/

```
control.ControlEvents.shutdown(mut) -> Result<(), Error>
```

End the connection and report how it went.

Stops the connection even while command senders remain alive. Unread
notifications are discarded so cleanup cannot wait on a full buffer.
If the stream already delivered its terminal error, this succeeds;
that error is not delivered twice.

# Errors

Returns a connection or cleanup error not already delivered by the
stream. Caller-requested closure succeeds when cleanup succeeds.
