From e9199a53161186a2e197dea355c9a536dd28b594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Str=C3=B6m?= Date: Thu, 21 Nov 2019 12:38:07 +0100 Subject: [PATCH] Improve MQTT documentation (#2967) --- docs/modules/mqtt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/mqtt.md b/docs/modules/mqtt.md index 0a01d1ba..0b9261df 100644 --- a/docs/modules/mqtt.md +++ b/docs/modules/mqtt.md @@ -157,8 +157,8 @@ end In reality, the connected function should do something useful! -The two callbacks to `:connect()` alias with the "connect" and "offline" -callbacks available through `:on()`. +The first callback to `:connect()` aliases with the "connect" callback available through `:on()` (the last passed callback to either of those are used). +The second (failure) callback is however not the same as the "offline" `:on()` callback. The "offline" callback is only called after an already established connection becomes closed. If the `connect()` call fails to establish a connection, the callback passed to `:connect()` is called and nothing else. Previously, we instructed an application to pass either the *integer* 0 or *integer* 1 for `secure`. Now, this will trigger a deprecation warning; please