From 3ae6c8890519586e798e1372253bbe67006f73d8 Mon Sep 17 00:00:00 2001 From: Abel Feng Date: Thu, 14 Mar 2024 17:40:38 +0800 Subject: [PATCH] bugfix: still check request payload the ttrpc golang do not send flagNodata in the request even it is an empty request. Signed-off-by: Abel Feng --- src/asynchronous/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asynchronous/server.rs b/src/asynchronous/server.rs index 26c49f2c..fa606a96 100644 --- a/src/asynchronous/server.rs +++ b/src/asynchronous/server.rs @@ -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),