Skip to content

Commit

Permalink
bugfix: still check request payload
Browse files Browse the repository at this point in the history
the ttrpc golang do not send flagNodata in the request even it is an
empty request.

Signed-off-by: Abel Feng <[email protected]>
  • Loading branch information
abel-von committed May 13, 2024
1 parent 152ac12 commit 3ae6c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asynchronous/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ impl HandlerContext {

let task = spawn(async move { stream.handler(ctx, si).await });

if !no_data {
if !no_data && !req.payload.is_empty() {
// Fake the first data message.
let msg = GenMessage {
header: MessageHeader::new_data(stream_id, req.payload.len() as u32),
Expand Down

0 comments on commit 3ae6c88

Please sign in to comment.