Fix Osai Reconnect

This commit is contained in:
Nicola Carminati
2019-04-16 08:43:58 +00:00
parent 6a1659d6ae
commit 97079e21f1
+7 -2
View File
@@ -134,7 +134,7 @@ namespace CMS_CORE_Library.Osai
}
catch (Exception ex)
{
return NOT_CONNECTED_ERROR;
return ManageException(ex);
}
return NO_ERROR;
@@ -4178,7 +4178,7 @@ namespace CMS_CORE_Library.Osai
Connected = false;
//Catch the .Net exceptions
if (ex is EndpointNotFoundException)
if (ex is EndpointNotFoundException || ex is TimeoutException)
return NOT_CONNECTED_ERROR;
else
return CmsError.InternalError(ex.Message);
@@ -4186,6 +4186,11 @@ namespace CMS_CORE_Library.Osai
private CmsError GetNCError(uint errorClass, uint errorNum)
{
if (errorClass == 2 && errorNum == 25)
{
Connected = false;
return NOT_CONNECTED_ERROR;
}
return CmsError.NcError(GetNCErrorMessage(errorClass, errorNum));
}