Skip to content

Commit ab2872a

Browse files
committed
copas example improved
1 parent 7141d63 commit ab2872a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/copas.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ client:on{
5959
copas.addthread(function()
6060
print("running client in separated copas thread #1...")
6161
mqtt.run_sync(client)
62+
63+
-- NOTE: in sync mode no automatic reconnect is working, but you may just wrap "mqtt.run_sync(client)" call in a loop like this:
64+
-- while true do
65+
-- mqtt.run_sync(client)
66+
-- end
6267
end)
6368

6469
copas.addthread(function()

0 commit comments

Comments
 (0)