Skip to content

Commit e3935de

Browse files
stromnetmarcelstoer
authored andcommitted
Improve MQTT documentation (#2967)
1 parent f3b4984 commit e3935de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/modules/mqtt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ end
157157

158158
In reality, the connected function should do something useful!
159159

160-
The two callbacks to `:connect()` alias with the "connect" and "offline"
161-
callbacks available through `:on()`.
160+
The first callback to `:connect()` aliases with the "connect" callback available through `:on()` (the last passed callback to either of those are used).
161+
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.
162162

163163
Previously, we instructed an application to pass either the *integer* 0 or
164164
*integer* 1 for `secure`. Now, this will trigger a deprecation warning; please

0 commit comments

Comments
 (0)