Skip to content

Commit

Permalink
fix mongodb input concurrent map read/write
Browse files Browse the repository at this point in the history
closes #1211
  • Loading branch information
kols authored and sparrc committed May 18, 2016
1 parent b065573 commit 1dbe3b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bugfixes

- [#1195](https://github.com/influxdata/telegraf/pull/1195): Docker panic on timeout. Thanks @zstyblik!
- [#1211](https://github.com/influxdata/telegraf/pull/1211): mongodb input. Fix possible panic. Thanks @kols!

## v0.13 [2016-05-11]

Expand Down
6 changes: 3 additions & 3 deletions plugins/inputs/mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ func (m *MongoDB) Gather(acc telegraf.Accumulator) error {
}
}
wg.Add(1)
go func() {
go func(srv *Server) {
defer wg.Done()
outerr = m.gatherServer(m.getMongoServer(u), acc)
}()
outerr = m.gatherServer(srv, acc)
}(m.getMongoServer(u))
}

wg.Wait()
Expand Down

0 comments on commit 1dbe3b8

Please sign in to comment.