# LibTmux.PsmuxServer.RefreshAsync

- **Module:** LibTmux.PsmuxServer
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Psmux/PsmuxServer.cs#L152
- **Page:** https://libtmux.org/reference/dotnet/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.
