treat the contract as repudiated forthwith on the ocurrence