Skip to content

Commit

Permalink
Increase initial connection timeout to 60 seconds due to latency issu…
Browse files Browse the repository at this point in the history
…es with SD App
  • Loading branch information
BarRaider committed Oct 28, 2022
1 parent 7a0ad9a commit 8612fb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions barraider-sdtools/Backend/PluginContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace BarRaider.SdTools
{
class PluginContainer
{
private const int STREAMDECK_INITIAL_CONNECTION_TIMEOUT_SECONDS = 60;
private StreamDeckConnection connection;
private readonly ManualResetEvent connectEvent = new ManualResetEvent(false);
private readonly ManualResetEvent disconnectEvent = new ManualResetEvent(false);
Expand Down Expand Up @@ -57,6 +58,7 @@ public void Run(StreamDeckOptions options)
Logger.Instance.LogMessage(TracingLevel.INFO, "Connecting to Stream Deck...");

// Time to wait for initial connection
if (connectEvent.WaitOne(TimeSpan.FromSeconds(STREAMDECK_INITIAL_CONNECTION_TIMEOUT_SECONDS)))
{
Logger.Instance.LogMessage(TracingLevel.INFO, "Connected to Stream Deck");

Expand Down

0 comments on commit 8612fb1

Please sign in to comment.