wait for the server to become ready