v1.4.2 Bugfix reconnect error
When a disconnect happened while a packet was being sent, the client would not recover in certain (default) conditions and get stuck in a disconnected state.
Thanks @lumapu for finding out and testing the solution.
I also did minor code cleanup.