On the other hand, what if the server comes back faster than 5 seconds? No particular reason to wait 5 seconds to see if the server is back. 

Consider also that in some situations people's connections will drop, but the server is totally fine. In that case a 5s delay might not be appropriate. I would start checking to see if the server is up pretty much immediately and check a bunch of times.