From 003c2453c31d29c2138ae435062178d58a04e924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Tue, 22 Aug 2017 22:05:24 +0200 Subject: [PATCH] Add note to mqtt:subscribe Fixes #2039 --- docs/en/modules/mqtt.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/modules/mqtt.md b/docs/en/modules/mqtt.md index a79f9d4e..f445f8e7 100644 --- a/docs/en/modules/mqtt.md +++ b/docs/en/modules/mqtt.md @@ -221,6 +221,10 @@ m:subscribe("/topic",0, function(conn) print("subscribe success") end) m:subscribe({["topic/0"]=0,["topic/1"]=1,topic2=2}, function(conn) print("subscribe success") end) ``` +!!! caution + + Rather than calling `subscribe` multiple times you should use the multiple topics syntax shown in the above example if you want to subscribe to more than one topic at once. + ## mqtt.client:unsubscribe() Unsubscribes from one or several topics.