1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

mqtt: bug fixes connection establishment

This commit is contained in:
Steffen Vogel 2020-12-04 09:09:09 +01:00
parent 945a8bbcaa
commit 787a4228bc

View file

@ -176,7 +176,7 @@ int mqtt_init(struct vnode *n)
int ret;
struct mqtt *m = (struct mqtt *) n->_vd;
m->client = mosquitto_new(n->name, 0, (void *) n);
m->client = mosquitto_new(NULL, true, (void *) n);
if (!m->client)
return -1;
@ -194,7 +194,7 @@ int mqtt_init(struct vnode *n)
m->port = 1883;
m->qos = 0;
m->retain = 0;
m->keepalive = 1; /* 1 second */
m->keepalive = 5; /* 5 second, minimum required for libmosquitto */
m->host = nullptr;
m->username = nullptr;