mirror of
https://github.com/go-delve/delve.git
synced 2026-05-05 20:26:14 +02:00
service/rpccommon: print error when we can't decode request body (#4247)
Instead of shutting down the connection without doing saying anything we should print an error, send an error response and try to continue serving the connection.
This commit is contained in:
parent
1f92901278
commit
69f247c34f
@ -238,7 +238,9 @@ func (s *ServerImpl) serveJSONCodec(conn io.ReadWriteCloser) {
|
||||
}
|
||||
// argv guaranteed to be a pointer now.
|
||||
if err = codec.ReadRequestBody(argv.Interface()); err != nil {
|
||||
return
|
||||
s.log.Errorf("can't read request body: %v", err)
|
||||
s.sendResponse(sending, &req, &rpc.Response{}, nil, codec, fmt.Sprintf("malformed request body: %v", err))
|
||||
continue
|
||||
}
|
||||
if argIsValue {
|
||||
argv = argv.Elem()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user