Add a check so the client waits for the server to be ready before starting.