Skip to content

Commit ee227f1

Browse files
Fix debugging deadlock (#807)
* fix debugger deadlock * revertBuildInfo * ignore BuildInfo changes forever
1 parent b5dc308 commit ee227f1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Diff for: PowerShellEditorServices.build.ps1

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ $script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) {
2222
$script:SaveModuleSupportsAllowPrerelease = (Get-Command Save-Module).Parameters.ContainsKey("AllowPrerelease")
2323
$script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Host", "BuildInfo", "BuildInfo.cs")
2424

25+
# ignore changes to this file
26+
git update-index --assume-unchanged "$PSScriptRoot/src/PowerShellEditorServices.Host/BuildInfo/BuildInfo.cs"
27+
2528
if ($PSVersionTable.PSEdition -ne "Core") {
2629
Add-Type -Assembly System.IO.Compression.FileSystem
2730
}

Diff for: src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ public override void Stop()
137137

138138
private void ListenForConnection()
139139
{
140-
var connectionTasks = new List<Task> {WaitForConnectionAsync(this.inOutPipeServer)};
141-
if (this.outPipeServer != null)
142-
{
143-
connectionTasks.Add(WaitForConnectionAsync(this.outPipeServer));
144-
}
145-
146-
Task.Run(async () =>
140+
Task.Factory.StartNew(async () =>
147141
{
148142
try
149143
{
144+
var connectionTasks = new List<Task> {WaitForConnectionAsync(this.inOutPipeServer)};
145+
if (this.outPipeServer != null)
146+
{
147+
connectionTasks.Add(WaitForConnectionAsync(this.outPipeServer));
148+
}
149+
150150
await Task.WhenAll(connectionTasks);
151151
this.OnClientConnect(new NamedPipeServerChannel(this.inOutPipeServer, this.outPipeServer, this.logger));
152152
}

0 commit comments

Comments
 (0)