server: remove unparsed body from request and message

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-21 15:30:19 +03:00
parent 1a8648f95b
commit 7e512979c8
4 changed files with 15 additions and 14 deletions

View File

@@ -239,7 +239,7 @@ func (s *tcpServer) createSubHandler(sb *tcpSubscriber, opts server.Options) bro
vals = append(vals, reflect.ValueOf(ctx))
}
vals = append(vals, reflect.ValueOf(msg.Payload()))
vals = append(vals, reflect.ValueOf(msg.Body()))
returnValues := handler.method.Call(vals)
if err := returnValues[0].Interface(); err != nil {
@@ -258,7 +258,6 @@ func (s *tcpServer) createSubHandler(sb *tcpSubscriber, opts server.Options) bro
contentType: ct,
payload: req.Interface(),
header: msg.Header,
body: msg.Body,
codec: cf,
})
}()