If any person assaults an officer of the county court while in the execution of his duty, he shall be liable—
and an officer of the court may take the offender into custody, with or without warrant, and bring him before the court.
The judge may at any time revoke an order committing a person to prison under this section and, if he is already in custody, order his discharge.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .