Skip to content

Commit 5de6db1

Browse files
Dozingfiretruckgitee-org
authored andcommitted
!109 修改MQTT示例代码
Merge pull request !109 from zabbey/master
2 parents 019c12d + 8350aa0 commit 5de6db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/network/libemqtt/luat_lib_mqtt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ mqttc = mqtt.create(nil,"120.55.137.106", 1884)
240240
-- 加密TCP链接,不验证服务器证书
241241
mqttc = mqtt.create(nil,"120.55.137.106", 8883, true)
242242
-- 加密TCPTCP链接,单服务器证书验证
243-
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {server_cert=io.readFile("/luadb/ca.crt"))
243+
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {server_cert=io.readFile("/luadb/ca.crt")})
244244
-- 加密TCPTCP链接,双向证书验证
245245
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {
246246
server_cert=io.readFile("/luadb/ca.crt"),
247247
client_cert=io.readFile("/luadb/client.pem"),
248248
client_key="123456",
249249
client_password="123456",
250-
)
250+
})
251251
*/
252252
static int l_mqtt_create(lua_State *L) {
253253
int ret = 0;

0 commit comments

Comments
 (0)