Fix send invalid json

This commit is contained in:
Александр Кирюхин 2022-05-24 18:55:31 +03:00
parent 4a81eff217
commit 281eda83c9
No known key found for this signature in database
GPG key ID: 6DF7A2910D0699E9

View file

@ -83,11 +83,6 @@ func (r *RpcServer) Resolve(ctx context.Context, rd io.Reader, w io.Writer, para
for { for {
req := new(RpcRequest) req := new(RpcRequest)
if err := dec.Decode(req); err != nil { if err := dec.Decode(req); err != nil {
if err == io.EOF {
break
}
r.logger.Logf("Can't read body: %v", err)
WriteError(ErrCodeParseError, enc)
break break
} }
exec := func() { exec := func() {