sendgrid/go-statsdclient — pull request #13 by vaskoz (2014-06-09 18:04:49+00:00)
Title: Fix race condition: do not mutate data without a mutex.

This fixes a data race discovered in Fingerprintd

WARNING: DATA RACE
Read by goroutine 21:
bufio.(*Writer).flush()
/Users/vaskozdravevski/code/go/src/pkg/bufio/bufio.go:527 +0xb6
bufio.(*Writer).Flush()
/Users/vaskozdravevski/code/go/src/pkg/bufio/bufio.go:519 +0x46
github.com/sendgrid/go-statsdclient.(*client).Flush()
/Users/vaskozdravevski/gocode/src/github.com/sendgrid/fingerprintd/Godeps/_workspace/src/github.com/sendgrid/go-statsdclient/statsd.go:151 +0x5d

Previous write by goroutine 24:
bufio.(*Writer).Write()
/Users/vaskozdravevski/code/go/src/pkg/bufio/bufio.go:575 +0x4cd
fmt.Fprintf()
/Users/vaskozdravevski/code/go/src/pkg/fmt/print.go:189 +0xd0
github.com/sendgrid/go-statsdclient.(*client).send()
/Users/vaskozdravevski/gocode/src/github.com/sendgrid/fingerprintd/Godeps/_workspace/src/github.com/sendgrid/go-statsdclient/statsd.go:189 +0x34a
github.com/sendgrid/go-statsdclient.(*client).Duration()
/Users/vaskozdravevski/gocode/src/github.com/sendgrid/fingerprintd/Godeps/_workspace/src/github.com/sendgrid/go-statsdclient/statsd.go:113 +0x191