Removed event emitter code fron retry function.