If the defendant is committed for contempt, the complainant may proceed with the action as if the bill had been taken for confessed, the allegations being taken as in all respects true. But, in that case, all further proceedings for the contempt shall cease, and the court, or the judge of the court, may discharge the defendant from custody.