check error on json unmarshal
This commit is contained in:
parent
61977e06f9
commit
a2826f5bcf
3
main.go
3
main.go
|
@ -196,6 +196,9 @@ func handleConnection(conn net.Conn, UC MetadataCache, PC MetadataCache) {
|
||||||
_, err := conn.Read(buf)
|
_, err := conn.Read(buf)
|
||||||
var c cachecommand
|
var c cachecommand
|
||||||
err = json.Unmarshal(buf, &c)
|
err = json.Unmarshal(buf, &c)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("json.Unmarshal: %s returned %s", buf, err.Error())
|
||||||
|
}
|
||||||
log.Printf("JSON got: %#v", c)
|
log.Printf("JSON got: %#v", c)
|
||||||
var values []string
|
var values []string
|
||||||
if c.ObjectType == "u" {
|
if c.ObjectType == "u" {
|
||||||
|
|
Loading…
Reference in New Issue