mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
fix: Append UserName to the SourceGitIPCChannel NamedPipeServerStream to allow multiple users usage on the same server (#1244) (#1246)
This commit is contained in:
parent
00e56ce9d1
commit
f09367a614
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ namespace SourceGit.Models
|
|||
_singletoneLock = File.Open(Path.Combine(Native.OS.DataDir, "process.lock"), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
_isFirstInstance = true;
|
||||
_server = new NamedPipeServerStream(
|
||||
"SourceGitIPCChannel",
|
||||
"SourceGitIPCChannel" + Environment.UserName,
|
||||
PipeDirection.In,
|
||||
-1,
|
||||
PipeTransmissionMode.Byte,
|
||||
|
@ -40,7 +40,7 @@ namespace SourceGit.Models
|
|||
{
|
||||
try
|
||||
{
|
||||
using (var client = new NamedPipeClientStream(".", "SourceGitIPCChannel", PipeDirection.Out))
|
||||
using (var client = new NamedPipeClientStream(".", "SourceGitIPCChannel" + Environment.UserName, PipeDirection.Out, PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly))
|
||||
{
|
||||
client.Connect(1000);
|
||||
if (!client.IsConnected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue