Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion DiscordRPC/IO/ManagedNamedPipeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ private bool AttemptConnection(int pipe, bool isSandbox = false)
{
Logger.Info("Attempting to connect to '{0}'", pipename);
_stream = new NamedPipeClientStream(".", pipename, PipeDirection.InOut, PipeOptions.Asynchronous);

// Intentionally use a timeout of 0 here to avoid spinlock overhead.
// We are already performing local retry logic, so this is not required.
_stream.Connect(1000);

//Spin for a bit while we wait for it to finish connecting
Expand Down Expand Up @@ -378,7 +381,7 @@ public void Close()
return;
}

//flush and dispose
//flush and dispose
try
{
//Wait for the stream object to become available.
Expand Down