Regression in main for "not running nodb devices" since DeviceProxy calls reconnect instead of connect
This issue is related to: pytango#583 (comment 1700844459).
A recent modification is the kernel (related to IDLv6 and telemetry), introduces a regression in the Tango::DeviceProxy class for devices not using a database and not running.
After a first call Tango::DeviceProxy::reconnect
executed at devapi_base.cpp:1862 (which, in turn, generates a call to Tango::Connection::reconnect), a call to Tango::DeviceProxy::ping is made at line 1902 in case we are not using a tango database. This call to ping generates a new call to Tango::DeviceProxy::reconnect (recursive call). The elapsed time since the last connection attempt being close to zero seconds, the test done at line 738 (aiming to limit frequency of the connection attempts) fails and throw the observed excepetion.
A simple fix consists in extending existing the exception filtering we have around the call to Tango::DeviceProxy::ping. The idea is simply to intercept the API_CantConnectToDevice exception in case the device nodb device in not running. I will give this a try. It gives:
if(dbase_used == false)
{
try
{
ping();
}
catch(Tango::ConnectionFailed &dfe)
{
if(strcmp(dfe.errors[1].reason, API_DeviceNotDefined) == 0)
{
throw;
}
}
catch(Tango::DevFailed &tdf)
{
if(strcmp(tdf.errors[0].reason, API_CantConnectToDevice) != 0)
{
throw;
}
}
}