Wait a bit for server if client cannot connect at first.

I don't know much about this stuff, there's probably a better way