Update MasterServerPinger to modern approach

This commit is contained in:
teinarss
2020-12-20 18:50:38 +01:00
committed by abcdefg30
parent d6e9cdab5b
commit 73bba97aaa

View File

@@ -13,6 +13,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BeaconLib; using BeaconLib;
using OpenRA.Network; using OpenRA.Network;
using OpenRA.Server; using OpenRA.Server;
@@ -107,7 +108,7 @@ namespace OpenRA.Mods.Common.Server
{ {
isBusy = true; isBusy = true;
Action a = () => Task.Run(() =>
{ {
try try
{ {
@@ -160,9 +161,7 @@ namespace OpenRA.Mods.Common.Server
} }
isBusy = false; isBusy = false;
}; });
a.BeginInvoke(null, null);
} }
} }
} }