[PLAT-3420] Only wait if there isn't a result available. (cherry-picking from commit 1a718b5178fcbaab1180bee3b092e135d4c5e03e)