Skip to content
Snippets Groups Projects
Unverified Commit 4fab572b authored by Daniel Nelson's avatar Daniel Nelson
Browse files

Release buffer back to pool earlier

parent b9f31952
No related branches found
No related tags found
No related merge requests found
......@@ -427,13 +427,13 @@ func (s *Statsd) parser() error {
return nil
case buf := <-s.in:
lines := strings.Split(buf.String(), "\n")
s.bufPool.Put(buf)
for _, line := range lines {
line = strings.TrimSpace(line)
if line != "" {
s.parseStatsdLine(line)
}
}
s.bufPool.Put(buf)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment