fix mqtt client id bug
This commit is contained in:
parent
aba6f7b2da
commit
d00604d37e
@ -56,7 +56,7 @@ namespace Plugin
|
||||
.WithAutoReconnectDelay(TimeSpan.FromSeconds(5))
|
||||
.WithMaxPendingMessages(10000)
|
||||
.WithClientOptions(new MqttClientOptionsBuilder()
|
||||
.WithClientId(_systemConfig.ClientId ?? Guid.NewGuid().ToString())
|
||||
.WithClientId(string.IsNullOrWhiteSpace( _systemConfig.ClientId) ? Guid.NewGuid().ToString() : _systemConfig.ClientId)
|
||||
.WithTcpServer(_systemConfig.MqttIp, _systemConfig.MqttPort)
|
||||
.WithCredentials(_systemConfig.MqttUName, _systemConfig.MqttUPwd)
|
||||
.WithTimeout(TimeSpan.FromSeconds(30))
|
||||
|
Loading…
Reference in New Issue
Block a user