handle timeout reached in wait_for()