With a simulation, the Gazebo clock could potentially not be available right away (takes time to be published or started unpublished). The spawner script proceeds to loading the controllers and eventually times out if the clock does not arrive in time.
A change to have the spawner script wait for the clock to be published would make the loading of controller more resilient in simulation when the simulated clock could be delayed.
With a simulation, the Gazebo clock could potentially not be available right away (takes time to be published or started unpublished). The spawner script proceeds to loading the controllers and eventually times out if the clock does not arrive in time.
A change to have the spawner script wait for the clock to be published would make the loading of controller more resilient in simulation when the simulated clock could be delayed.