Skip to content

Commit fca91bd

Browse files
author
N. Taylor Mullen
committed
Flush after writing.
- Not all streams auto-flush after write. For instance creating a duplex JsonRpc stream to run the O# server in-proc results in the server never initializing because the flush result is not sent down to the client. For instance: https://github.com/dotnet/aspnetcore-tooling/blob/ed01e6b0d167f0dda61d9cdba226f8844fa1d96e/src/Razor/src/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorLanguageServerClient.cs#L49
1 parent c8cca33 commit fca91bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/JsonRpc/OutputHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ private void ProcessOutputQueue()
6565
_output.Write(ms.ToArray(), 0, (int)ms.Position);
6666
}
6767
}
68+
69+
_output.Flush();
6870
}
6971
}
7072
}

0 commit comments

Comments
 (0)