# LibTmux.OwnedServerScope.DisposeAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Server.Lifecycle.cs#L488
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-ownedserverscope-disposeasync/

```
LibTmux.OwnedServerScope.DisposeAsync() -> ValueTask
```

Stops the owned server.

Calls made while a stop is under way share it, and complete or fail with
it. A call after a failed stop tries again; one after a stop that
succeeded returns at once.

## Returns

A task that completes once the server process has exited.

## Raises

- [`LibTmuxException`](/en/csharp/latest/reference/libtmux-libtmuxexception/): The server could not be stopped, or had not exited within five seconds.
