It's possible that we're not detecting session closed correctly.

george moromisato 4 Dec 2020:

Fixed. The problem was that Esper was not sending a disconnect message back under certain conditions.