wait for server to start