Added lambda to poll_until call

Change-Id: Ia7c799f00003d7d5455c09caaa898ee07abea4b6