exit the event loop as soon as there's a failure