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:
parent
945a8bbcaa
commit
787a4228bc
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue