Here is a snippet from the documentation on how the reconnecting to various collectors works within a collector group:
"If a Collector goes down, the connected Agents will try to reconnect for 20 seconds. If it doesn't get available again during that time span, the Agents will fail over to a different Collector in that group.
Please mind that the Agents do not fail back if they are connected when their original Collector becomes available again, but they will fail back / redistribute when the apps / Agents are restarted.
If a Collector does not come up again within half an hour it is no longer displayed in the Server Settings > Collectors list."
From this, we see that the agent tries to connect to each collector for 20 seconds and after that, it moves on. If it can't connect to either collector in that timeframe then the application would have to restarted to trigger the agent to attempt connections once again.