If, at the time when the discharge is granted, the petitioner is under arrest, by virtue of an execution against his person issued, or an order of arrest made, in an action or special proceeding, founded upon a debt or liability from which he is discharged, as prescribed in the foregoing sections of this article, he must be released from the arrest, upon producing to the officer his discharge, or a certified copy of the record thereof. If the adverse party wishes to test the validity of the discharge, he may procure a new order of arrest, or cause a new execution to be issued, as the case requires.
N.Y. Debt. and Cred. Law § 86