Username not set for mqtt_consumer plugin

Username parameter for the mqtt_consumer plugin was not pass to the client because an incorrect empty check.

closes #781
This commit is contained in:
Pascal Larin
2016-03-02 12:36:23 -05:00
committed by Cameron Sparr
parent ed9937bbd8
commit 8464be691e
2 changed files with 2 additions and 1 deletions

View File

@@ -181,7 +181,7 @@ func (m *MQTTConsumer) createOpts() (*mqtt.ClientOptions, error) {
}
user := m.Username
if user == "" {
if user != "" {
opts.SetUsername(user)
}
password := m.Password