Skip to content

Commit

Permalink
Merge pull request #39 from 304NotModified/refresh-sec
Browse files Browse the repository at this point in the history
Enhancement: current machine check: trimmed, case insensitive and allow .
  • Loading branch information
BlythMeister committed Sep 27, 2018
2 parents 1de9936 + 233f4f8 commit 533fa65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ServiceBouncer/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ private async Task Connect()
toolStripConnectButton.Tag = @"Connected";
toolStripConnectButton.Image = Properties.Resources.Disconnect;

backgroundRefreshSeconds = machineHostname == Environment.MachineName ? 1 : 30;
machineHostname = machineHostname.Trim();
var isCurrentMachine = machineHostname == "." || Environment.MachineName.Equals(machineHostname, StringComparison.CurrentCultureIgnoreCase);
backgroundRefreshSeconds = isCurrentMachine ? 1 : 30;

refreshTimer.Enabled = true;
refreshTimer.Interval = backgroundRefreshSeconds * 1000;

Expand Down

0 comments on commit 533fa65

Please sign in to comment.