I’m trying to find a way to gracefully recover a client after the server times out a pengine session. What I think is happening:
-
A pengine session is established but after a timeout on the server side, it terminates the session. I’m not sure if it sends a message at that point but, in any case, the client isn’t ready to receive it. (It’s in the read phase of a read/eval loop.)
-
After some time the client complete’s the read and generates an “ask” and gets back an existence error; makes sense. However at this point I can’t find a way to “destroy” the client side part of the pengine. pengine_destroy/1 appears to succeed but pengine_property/2 indicates the pengine is still there.
The consequence of this is that the event loop for any pengines subsequently created don’t terminate normally because the loop thinks there are other pengines alive.
Is this a hole in my understanding or a hole in the protocol implementation?