Fix Osai Reconnect
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user