mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: use PipeOptions.FirstPipeInstance
to create NamedPipeServerStream
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
05982e6dc0
commit
0acbe3e487
1 changed files with 6 additions and 1 deletions
|
@ -19,7 +19,12 @@ namespace SourceGit.Models
|
|||
{
|
||||
try
|
||||
{
|
||||
_server = new NamedPipeServerStream("SourceGitIPCChannel", PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly);
|
||||
_server = new NamedPipeServerStream(
|
||||
"SourceGitIPCChannel",
|
||||
PipeDirection.In,
|
||||
1,
|
||||
PipeTransmissionMode.Byte,
|
||||
PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly | PipeOptions.FirstPipeInstance);
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
Task.Run(StartServer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue