If it is a Guardian/Generac generator, that is is in auto and you know utility is back on, check F1 and F2 fuses to see if thefe it 240vac going out to the generator transformer. If the PCB doesn't "see" the utility voltage return, the genset will keep running.