# server.Server.shutdown

- **Module:** server.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/server.rs#L585
- **Page:** https://libtmux.org/reference/rs/server-server-shutdown/

```
server.Server.shutdown(self) -> Result<(), Error>
```

Stop accepting clients and wait for every active client process.

Shutdown is idempotent and affects every clone of this server.
It never stops the tmux daemon itself. Await it before dropping the
Tokio runtime when deterministic reaping matters. With control mode
enabled, this also closes persistent control connections.

# Errors

Propagates failures reported by the shared executor shutdown boundary.

## Example

```rust
let server = libtmux::Server::new()?;
server.shutdown().await?;
server.shutdown().await?;
```
