mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-26 01:01:01 +00:00
Merge pull request #36 from prometheus/increase-udp-buf
Increase receivable UDP datagram size to 65535 bytes.
This commit is contained in:
commit
60dbb43e8a
1 changed files with 2 additions and 3 deletions
|
@ -293,10 +293,9 @@ func buildEvent(statType, metric string, value float64) (Event, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *StatsDListener) Listen(e chan<- Events) {
|
func (l *StatsDListener) Listen(e chan<- Events) {
|
||||||
// TODO: evaluate proper size according to MTU
|
buf := make([]byte, 65535)
|
||||||
var buf [512]byte
|
|
||||||
for {
|
for {
|
||||||
n, _, err := l.conn.ReadFromUDP(buf[0:])
|
n, _, err := l.conn.ReadFromUDP(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue