# LibTmux.PsmuxServer.RefreshAsync

- **Module:** LibTmux.PsmuxServer
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Psmux/PsmuxServer.cs#L154
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-psmuxserver-refreshasync/

```
LibTmux.PsmuxServer.RefreshAsync(cancellationToken: CancellationToken) -> Task<PsmuxServer>
```

Reconnects and returns a fresh server observation.

## Parameters

- `cancellationToken` (CancellationToken): Cancels process startup and discovery.

## Returns

A replacement observation using the same endpoint settings.

## Raises

- `InvalidOperationException`: The selected namespace has no live session.
- `NotSupportedException`: The executable, build, namespace, or session count is outside the preview contract.
- `LibTmuxException`: The verified client could not complete discovery.
