Fix hold and release of a retrying task

Previously, on release, it will reset the task's state to `waiting`.

Fix #355.