Skip to content

Commit

Permalink
Fix debugging deadlock (#807)
Browse files Browse the repository at this point in the history
* fix debugger deadlock

* revertBuildInfo

* ignore BuildInfo changes forever
  • Loading branch information
TylerLeonhardt authored Dec 8, 2018
1 parent b5dc308 commit ee227f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ public override void Stop()

private void ListenForConnection()
{
var connectionTasks = new List<Task> {WaitForConnectionAsync(this.inOutPipeServer)};
if (this.outPipeServer != null)
{
connectionTasks.Add(WaitForConnectionAsync(this.outPipeServer));
}

Task.Run(async () =>
Task.Factory.StartNew(async () =>
{
try
{
var connectionTasks = new List<Task> {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));
}
Expand Down

0 comments on commit ee227f1

Please sign in to comment.