解决使用host网络后,主服务无法连接mqtt网络的问题
This commit is contained in:
parent
acf8fb8c13
commit
f6312ffbce
|
|
@ -63,7 +63,7 @@ int main(int argc, char* argv[]) {
|
||||||
try {
|
try {
|
||||||
DataCache data_cache;
|
DataCache data_cache;
|
||||||
LiveDataCache live_data_cache;
|
LiveDataCache live_data_cache;
|
||||||
MqttClient mqtt_client("tcp://mqtt-broker:1883", "edge-proxy-main-client");
|
MqttClient mqtt_client("tcp://localhost:1883", "edge-proxy-main-client");
|
||||||
auto report_to_mqtt = [&](const UnifiedData& data) {
|
auto report_to_mqtt = [&](const UnifiedData& data) {
|
||||||
// 使用 DataStorage 单例存储处理后的 UnifiedData 对象
|
// 使用 DataStorage 单例存储处理后的 UnifiedData 对象
|
||||||
if (DataStorage::getInstance().storeProcessedData(data)) {
|
if (DataStorage::getInstance().storeProcessedData(data)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue