An action cannot be maintained against the sheriff for a rescue, or for an escape of a person arrested upon an execution or commitment, if, after the person's rescue or escape and before the commencement of the action, the prisoner returns to the jail or is retaken by the sheriff.
N.D.C.C. § 11-15-20