From 10cadfc5b599b3dcaef7d4a7420c748afe34e911 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 27 Oct 2017 14:11:50 +0900 Subject: [PATCH] ing --- protocol/json/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protocol/json/server.go b/protocol/json/server.go index dde8981..32c8546 100644 --- a/protocol/json/server.go +++ b/protocol/json/server.go @@ -85,7 +85,9 @@ func newCodecRequest(r io.Reader, encoder encode.Encoder) protocol.CodecRequest // Decode the request body and check if RPC method is valid. req := new(serverRequest) err := json.NewDecoder(r).Decode(req) - log.Printf("NewRequest err: %v", err) + if err == io.ErrUnexpectedEOF || err == io.EOF { + log.Printf("NewRequest err: %v", err) + } if err != nil { err = &Error{ Code: E_PARSE,