diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index 2e5038fca..38c783b81 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -22,6 +22,9 @@ $script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) { $script:SaveModuleSupportsAllowPrerelease = (Get-Command Save-Module).Parameters.ContainsKey("AllowPrerelease") $script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Host", "BuildInfo", "BuildInfo.cs") +# ignore changes to this file +git update-index --assume-unchanged "$PSScriptRoot/src/PowerShellEditorServices.Host/BuildInfo/BuildInfo.cs" + if ($PSVersionTable.PSEdition -ne "Core") { Add-Type -Assembly System.IO.Compression.FileSystem } diff --git a/src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs b/src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs index ba2c74931..1a49fcb61 100644 --- a/src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs +++ b/src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs @@ -137,16 +137,16 @@ public override void Stop() private void ListenForConnection() { - var connectionTasks = new List {WaitForConnectionAsync(this.inOutPipeServer)}; - if (this.outPipeServer != null) - { - connectionTasks.Add(WaitForConnectionAsync(this.outPipeServer)); - } - - Task.Run(async () => + Task.Factory.StartNew(async () => { try { + var connectionTasks = new List {WaitForConnectionAsync(this.inOutPipeServer)}; + if (this.outPipeServer != null) + { + connectionTasks.Add(WaitForConnectionAsync(this.outPipeServer)); + } + await Task.WhenAll(connectionTasks); this.OnClientConnect(new NamedPipeServerChannel(this.inOutPipeServer, this.outPipeServer, this.logger)); }