Skip to content

Commit

Permalink
Username not set for mqtt_consumer plugin
Browse files Browse the repository at this point in the history
Username parameter for the mqtt_consumer plugin was not pass to the client because an incorrect empty check.

closes #781
  • Loading branch information
chaton78 authored and sparrc committed Mar 3, 2016
1 parent ed9937b commit 8464be6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [#748](https://github.com/influxdata/telegraf/issues/748): Fix sensor plugin split on ":"
- [#722](https://github.com/influxdata/telegraf/pull/722): Librato output plugin fixes. Thanks @chrusty!
- [#745](https://github.com/influxdata/telegraf/issues/745): Fix Telegraf toml parse panic on large config files. Thanks @titilambert!
- [#781](https://github.com/influxdata/telegraf/pull/781): Fix mqtt_consumer username not being set. Thanks @chaton78!

## v0.10.4.1

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/mqtt_consumer/mqtt_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (m *MQTTConsumer) createOpts() (*mqtt.ClientOptions, error) {
}

user := m.Username
if user == "" {
if user != "" {
opts.SetUsername(user)
}
password := m.Password
Expand Down

0 comments on commit 8464be6

Please sign in to comment.