I've got a '47 O'Keefe. I had the same problem with mine. Still do once in a while. Make sure that the thermocouple wires are securely attached to the back of the safety valve. Take them off, sand them if you need to to make a good connection. If it continues to happen, you'll probably need to replace the thermocouple. I had mine replaced and it works fine now...
Let me know if this fixes the problem. I can probably call the guy who fixed my stove and get you a part number for the replacement thermocouple. It was a new thermocouple that he modified to make it work with the O'Keefe.