From 05abbf557682233450ebc83484f95cdbe43f3ad0 Mon Sep 17 00:00:00 2001 From: weixinwei Date: Fri, 24 Jan 2025 14:55:35 +0800 Subject: [PATCH] re-sent pending pdu after credits is enough Signed-off-by: weixinwei --- lib/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/socket.c b/lib/socket.c index eb073b93..b537c5d3 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -458,6 +458,8 @@ static int smb2_read_data(struct smb2_context *smb2, read_func func, if (!smb2_is_server(smb2)) { smb2->credits += smb2->hdr.credit_request_response; + /* Got credit, recheck if there are pending pdu to be sent. */ + smb2_change_events(smb2, smb2->fd, smb2_which_events(smb2)); } if (!smb2_is_server(smb2) && !(smb2->hdr.flags & SMB2_FLAGS_SERVER_TO_REDIR)) {