Delay port change for when checkbox gets unchecked

This commit is contained in:
Travis Nickles 2018-08-11 01:22:33 -05:00
parent 262992f757
commit 78383a77e6

View File

@ -2587,8 +2587,12 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
private async void WaitUDPPortChange() private async void WaitUDPPortChange()
{ {
await TaskRunner.Run(() => Program.rootHub.UseUDPPort()); await TaskRunner.Delay(100);
nUDUdpPortNum.Enabled = true; if (isUsingUDPServer())
{
await TaskRunner.Run(() => Program.rootHub.UseUDPPort());
nUDUdpPortNum.Enabled = true;
}
} }
private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e) private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)