This commit is contained in:
crusader 2017-10-27 14:11:50 +09:00
parent 9f519e728e
commit 10cadfc5b5

View File

@ -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)
if err == io.ErrUnexpectedEOF || err == io.EOF {
log.Printf("NewRequest err: %v", err)
}
if err != nil {
err = &Error{
Code: E_PARSE,