refuge/fubar — pull request #9 by mprymek (2014-12-10 10:35:31+00:00)
Title: Call handle_disconnected for all client terminations

If you restart mqtt broker, connection is closed,
mqtt_protocol terminates with reason "normal" and handle_disconnected
is not called. I.e. client code is not informed about connection
termination.

I thing this is bad. Maybe you should use this simplest solution or terminate protocol
with some other reason (tcp_closed?) whenever unexpected tcp disconnect occurs.