Commit d8445412 authored by Micha Mueller's avatar Micha Mueller
Browse files

Clean up MQTTPusher properly

parent 3d6406d0
......@@ -58,6 +58,8 @@ MQTTPusher::~MQTTPusher() {
if(_connected) {
mosquitto_disconnect(_mosq);
}
mosquitto_destroy(_mosq);
mosquitto_lib_cleanup();
}
void MQTTPusher::push() {
......@@ -160,6 +162,7 @@ void MQTTPusher::push() {
}
}
}
delete[] reads;
mosquitto_disconnect(_mosq);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment