smb2_server: allow smbd_smb2_request_pending_queue(0) to avoid STATUS_PENDING
[samba.git] / source3 / smbd / smb2_server.c
index 1e9ed331aa6a41b93d79795587bc309afe221e61..174b906f8b6c5783fe3ec4e6f9aebd9fc0a9fd66 100644 (file)
@@ -1391,7 +1391,7 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
                return NT_STATUS_OK;
        }
 
-       if (req->async_internal) {
+       if (req->async_internal || defer_time == 0) {
                /*
                 * An SMB2 request implementation wants to handle the request
                 * asynchronously "internally" while keeping synchronous