fix: mqtt默认值

dev
huangfeng 4 weeks ago
parent 5b001362f6
commit ff888017c7

@ -38,11 +38,10 @@ public class MqttConfig {
@Bean @Bean
public MqttClient mqttClient(MqttConnectOptions options) throws MqttException { public MqttClient mqttClient(MqttConnectOptions options) throws MqttException {
if (!enable) {
return null;
}
MqttClient client = new MqttClient(broker, clientId); MqttClient client = new MqttClient(broker, clientId);
if (enable) {
client.connect(options); client.connect(options);
}
return client; return client;
} }
} }

Loading…
Cancel
Save