hotfix: bad mqtt connection address

This commit is contained in:
Tobias Reisinger 2020-07-02 14:58:30 +02:00
parent 03b1cb857e
commit aa389d5c40
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project(controller
VERSION 0.2.3
VERSION 0.2.4
LANGUAGES C)
add_executable(controller src/main.c)

View file

@ -29,7 +29,7 @@ struct mg_connection*
connection_mqtt_connect(struct mg_mgr *mgr)
{
char address[100];
sprintf(address, "tcp://localhost:%u", global_config.mqtt_port);
sprintf(address, "tcp://127.0.0.1:%u", global_config.mqtt_port);
struct mg_connection *c = mg_connect(mgr, address, handler_mqtt);
return c;
}