Code to wait for ESA event.