In all cases between landlord and tenant, where one-half year's rent is in arrears and unpaid, and the landlord or lessor to whom such rent is due has the right by law to re-enter for non-payment thereof, such landlord or lessor may, without any formal demand or re-entry, commence an action of ejectment for the recovery of the demised premises. In case judgment is entered in favor of the plaintiff in the action of ejectment before the rent in arrearage and costs of the action are paid, then the lease of the lands shall cease and be determined, unless the lessee shall by appeal reverse the judgment, or by petition filed within 6 months after the entry of such judgment, obtain relief from the same. However, any tenant may, at any time before final judgment on the ejectment, pay or tender to the landlord or lessor of the premises the amount of rent in arrears and costs of the action, whereupon the action of ejectment shall be dismissed.
735 ILCS 5/9-204