Modified the bug...

This commit is contained in:
Henry Hu 2016-02-05 21:00:47 +08:00
parent f0fe6b67af
commit cab6033611
1 changed files with 0 additions and 9 deletions

View File

@ -4,7 +4,6 @@ import (
"bufio" "bufio"
"fmt" "fmt"
"log" "log"
"math"
"net" "net"
"os" "os"
"strings" "strings"
@ -14,7 +13,6 @@ import (
"github.com/influxdata/telegraf" "github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/encoding" "github.com/influxdata/telegraf/internal/encoding"
"github.com/influxdata/telegraf/internal/encoding/graphite"
"github.com/influxdata/telegraf/plugins/inputs" "github.com/influxdata/telegraf/plugins/inputs"
_ "github.com/influxdata/telegraf/internal/encoding/graphite" _ "github.com/influxdata/telegraf/internal/encoding/graphite"
@ -303,13 +301,6 @@ func (s *Socket) handleLines(buf []byte) {
// Parse it. // Parse it.
metrics, err := s.encodingParser.Parse(buf) metrics, err := s.encodingParser.Parse(buf)
if err != nil { if err != nil {
switch err := err.(type) {
case *graphite.UnsupposedValueError:
// Socket ignores NaN values with no error.
if math.IsNaN(err.Value) {
return
}
}
s.logger.Printf("unable to parse lines: %s: %s", buf, err) s.logger.Printf("unable to parse lines: %s: %s", buf, err)
return return
} }