wait for the server to sync