Decrease reconnect time for failed internet connection or automatically restart zerotier service

Hello! I have a client with zerotier installed on their EdgeRouter. This Ubiquiti EdgeRouter has 2 x wan interfaces with one configured as the primary and the other as a failover. If the primary fails we are seeing ZeroTier taking 5-10 minutes to reconnect. Is it possible to either decrease this reconnect timeout via local config or auto restart the services to force reconnect to occur faster? I have simulated and test the later via manual restart in the CLI and it works well, but I am not sure how to script the criteria to make it occur under the correct conditions.