fix the retry issue in daemon mode.