Is there any feature to automatically reconnect when fail?

i use a script to run playit on startup but sometime it wont connect so i need to run it manually. how to make it auto reconnect until the connection is established?