|
@@ -34,6 +34,8 @@ namespace WingCloudServer
|
|
|
private static JsonRpcClientPool _rpcClientPool;
|
|
|
private static Dictionary<string, IDynamicSlaveService> _remoteServices = new Dictionary<string, IDynamicSlaveService>();
|
|
|
|
|
|
+ private int _dongleValidinterval = 480;
|
|
|
+
|
|
|
public WingServer(string host)
|
|
|
{
|
|
|
_rpcInProcessServer = new JsonRpcServer();
|
|
@@ -42,6 +44,7 @@ namespace WingCloudServer
|
|
|
_rpcHttpServer = new JsonRpcServer();
|
|
|
_jsonRpcHttpServerEngine = new JsonRpcHttpServerEngine(host);
|
|
|
_rpcHttpServer.UseEngine(_jsonRpcHttpServerEngine);
|
|
|
+ _dongleValidinterval = GetDongleValidinterval();
|
|
|
WatchingUSB();
|
|
|
WatchingDongle();
|
|
|
}
|
|
@@ -720,7 +723,7 @@ namespace WingCloudServer
|
|
|
{
|
|
|
while (true)
|
|
|
{
|
|
|
- await Task.Delay(TimeSpan.FromMinutes(10));
|
|
|
+ await Task.Delay(TimeSpan.FromMinutes(_dongleValidinterval));
|
|
|
try
|
|
|
{
|
|
|
new DongleValidService().CheckAndVerifyLicense();
|
|
@@ -738,5 +741,19 @@ namespace WingCloudServer
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ private int GetDongleValidinterval()
|
|
|
+ {
|
|
|
+ var dongleValidinterval = 480;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ dongleValidinterval = ConfigurationManager.GetParammeter<IntParameter>("General", "DongleValidinterval").Value;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Logger.WriteLineError($"GetDongleValidinterval error:{ex}");
|
|
|
+ }
|
|
|
+ return dongleValidinterval;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|