We install a product known as Floodmaster for water heaters.? The units are installed on the water line that feeds the water heater and then a sensor is put on the floor next to the water heater in a pan.? If the sensor gets wet it automatically shuts the valve off to the water that feeds the heater not allowing the continuous filling of the water heater.? The water heater will continue to leak until the water is out of the heater, but it will not continue to feed the heater never allowing the flow to stop.? Many times people are not at home and this is a way of, at least, minimizing the damage.? We try to recommend this to people who are installing a new heater rather than ones that are already installed.? In order to install one you would have to drain down the old heater, remove it and then re-install it.? The older the heater the possibility it could cause a problem for the heater so we recommend doing it when you are replacing the heater.? These units can be used repeatedly so if you happen to have another heater leak it can be reprogrammed again.