DC detection and reconnection system