I replicated the closing of a websocket due to the ping/pong timeout and found that my system handles it gracefully without throwing that java.lang.IllegalStateException. The page stops updating but no errors are produced and I get the same log message about "Didn't receive Pong from Endpoint within..." I replicated this by making the Mango server delay to read the pong message.

I'm wondering if your browser isn't sending the pong message... (This should happen automatically by most every browser and isn't something you need to code into your page)

For yet more information on the connection failure you can add this to your log4j2.xml file

<AsyncLogger includeLocation="true" name="" level="debug"/>

Ah Ok I just got you latest post while drafting this. I'm posting it anyway since I put a little time into it and it could be helpful to someone else in the future.