(a) The jury may be discharged by the court on account of the sickness of a juror, or other accident or calamity requiring their discharge, or by consent of both parties, or after they have been kept together until it satisfactorily appears that there is no probability of their agreeing.
(b) In all cases where the jury is discharged during the trial, or after the cause is submitted to them, it may be tried again immediately or at a future date, as the court may direct.