|
@@ -428,9 +428,32 @@ namespace PRS.Mobile
|
|
|
TransportDisconnected?.Invoke(new TransportDisconnectedEventArgs());
|
|
|
Task.Run(() =>
|
|
|
{
|
|
|
- while (!IsConnected())
|
|
|
- App.Transport.Connect();
|
|
|
- ClientFactory.Validate(ClientFactory.SessionID);
|
|
|
+ ValidationStatus status = ValidationStatus.INVALID;
|
|
|
+ while (status != ValidationStatus.VALID)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ while (!IsConnected())
|
|
|
+ {
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ App.Transport.Connect();
|
|
|
+ }
|
|
|
+ catch (Exception eConnect)
|
|
|
+ {
|
|
|
+ MobileLogging.Log($"Reconnect() {eConnect.Message} \n {eConnect.StackTrace}");
|
|
|
+ Task.Delay(TimeSpan.FromMilliseconds(1000));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ status = ClientFactory.Validate(ClientFactory.SessionID);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ MobileLogging.Log($"Revalidate() {ex.Message} \n {ex.StackTrace}");
|
|
|
+ Task.Delay(TimeSpan.FromMilliseconds(1000));
|
|
|
+ }
|
|
|
+ }
|
|
|
DigitalFormDocumentFactory.Run();
|
|
|
});
|
|
|
}
|