Is there a good way to detect when “relay select” is complete? I have additional logic I need to run after the relay is selected and the best way I have been able to do this is to sort of sleep:
// Force client to send update to relay
relay select
// ***************************************************************************
// set utility cache property for desktop machines
// ***************************************************************************
if {exists ("win7"; "win8"; "win10") whose (operating system as string as lowercase contains it)}
//wait 60 seconds to make sure the relay is updated
parameter "startTime2"="{now}"
pause while { (now-time(parameter "startTime2") < 60*second) }
parameter "_server" = "{preceding text of first ":" of (following text of first "//" of (value of setting "__RelayServer1" of client))}"
…and so on. I would rather not use the pause while part unless I could detect if the agent was in a state of selecting it’s realy.