diff --git a/src/NexusMods.SingleProcess/CliServer.cs b/src/NexusMods.SingleProcess/CliServer.cs index 6496719da..a011af551 100644 --- a/src/NexusMods.SingleProcess/CliServer.cs +++ b/src/NexusMods.SingleProcess/CliServer.cs @@ -80,7 +80,7 @@ private Task StartTcpListenerAsync() private async Task StartListeningAsync() { - while (!_cancellationTokenSource.IsCancellationRequested) + while (_started && !_cancellationTokenSource.IsCancellationRequested) { try {