chickadee » mosquitto » set-mqtt-client-disconnect-callback!

(set-mqtt-client-disconnect-callback! client (lambda (client unexpected?) ...))procedure

Set the disconnect callback. This is called when the broker has received the DISCONNECT command and has disconnected the client.

  • unexpected?: boolean value indicating the reason for the disconnect. A value of #f means the client has called mqtt-disconnect. #t indicates that the disconnect is unexpected.