Following the cleanup of discovery files, preexisting servers do not support the
ROServiceDiscovery interface as it was renamed from
IROServiceDiscovery and this leads to exceptions being raised when doing discovery with up to date clients.
If the code is left as is, the first exception raised prevents further responses to be processed by the broadcast client, thus giving the impression that no server is available on the network.
We can avoid this by giving a handler for
TRODiscoveryClient.OnDiscoveryException which prevents the exception from escaping out of
ResponseReceived, thus allowing any further response to be processed.
While this is fine, the handler for
OnDiscoveryException does not receive any information about which server triggered the exception, which is kinda sad because the
ServerIP parameter could be passed along. Would it be possible to include it in a further release? Maybe in a second event to avoid crashes when the handler is assigned via a DFM.
As a side note, I would like to know how to gracefully handle the fact that the interface name can either be
IROServiceDiscovery (legacy) or
ROServiceDiscovery (current) because it’s near impossible to update all clients at once.