From b11358fa7d4b268095932137c073ec8d2bdc5dd4 Mon Sep 17 00:00:00 2001 From: dmitrygx Date: Mon, 10 Jan 2022 21:31:35 +0200 Subject: [PATCH] UCP/RNDV: Don't complete operation from CANCEL if RTS wasn't sent --- src/ucp/tag/rndv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ucp/tag/rndv.c b/src/ucp/tag/rndv.c index 9c36eec23ef..82c183b6f2a 100644 --- a/src/ucp/tag/rndv.c +++ b/src/ucp/tag/rndv.c @@ -420,10 +420,10 @@ ucs_status_t ucp_tag_send_start_rndv(ucp_request_t *sreq) void ucp_tag_rndv_cancel(ucp_request_t *sreq) { if (!(sreq->send.ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)) { + /* If RTS wasn't sent, it is still on the pending queue and the request + * will be completed from the purge callback */ if (sreq->flags & UCP_REQUEST_FLAG_RNDV_RTS_SENT) { ucp_rndv_req_add_to_cancelled_list(sreq, UCS_ERR_CANCELED); - } else { - ucp_rndv_complete_send(sreq, UCS_ERR_CANCELED, "rndv_cancel"); } } else { sreq->send.uct.func = ucp_proto_progress_rndv_cancel;