|
@@ -17,7 +17,7 @@ namespace Client
|
|
|
TaskHandler taskHandler;
|
|
|
int maxTaskCount;
|
|
|
string defaultFileDir;
|
|
|
- private Action<SimpleMessageHandler> heartbeat;
|
|
|
+ private Action<int> heartbeat;
|
|
|
IRevitCommandExcutor revitCommandExcutor;
|
|
|
private Action<int> reconnectAction;
|
|
|
public ClientApp(string ip, int port, string dir, int maxTaskCount, IRevitCommandExcutor revitCommandExcutor, int maxDownTaskCount=5) {
|
|
@@ -49,7 +49,7 @@ namespace Client
|
|
|
|
|
|
|
|
|
heartbeat = SendHeartbeat;
|
|
|
- heartbeat.BeginInvoke(simpleHandler, null, null);
|
|
|
+ heartbeat.BeginInvoke(0, null, null);
|
|
|
|
|
|
client.RunClientAsync(simpleHandler).Wait();
|
|
|
|
|
@@ -70,7 +70,7 @@ namespace Client
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- void SendHeartbeat(SimpleMessageHandler simpleHandler)
|
|
|
+ void SendHeartbeat(int nouse)
|
|
|
{
|
|
|
while (true)
|
|
|
{
|
|
@@ -83,7 +83,7 @@ namespace Client
|
|
|
catch (Exception e)
|
|
|
{
|
|
|
Console.WriteLine(e);
|
|
|
- throw;
|
|
|
+ Thread.Sleep(300*1000);
|
|
|
}
|
|
|
}
|
|
|
}
|