With a modern boiler, gas won’t leak from the system even if the pilot light is out. This is thanks to your thermocouple, a component that controls the flow of gas into your hot water heater. It constantly detects whether or not there is a pilot flame and shuts off the gas supply to the heater when there isn’t. This makes it particularly important that your thermocouple is in working order.