the millivolt generator is a skinny copper bulb that sits in the flame. a very small copper capillary goes from this bulb to what looks like a pellet at its end held in place by a small hex headed gland nut. this capillary has no gas inside but a fine insulated wire that goes from the tip to that bead that goes into the valve. Inside the valve is a small electromagnet with a spring and a cylindrical iron pellet and a neoprene seal. the millivolt generator when it's heated produces a measurable DC voltage around 740 millivolts. It is strong enough to actuate and hold the electromagnet within the valve open. when it loses is heat the snap you hear is the valve spring action closing the valve. I'd say replace the millivolt flame detector.