Skip to content

Commit

Permalink
UCP/WIREUP: Improve a comment and add useful assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrygx committed Dec 2, 2020
1 parent 7c8bd96 commit 1111358
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ucp/wireup/wireup_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,12 @@ static unsigned ucp_ep_cm_disconnect_progress(void *arg)
* anymore */
goto out;
} else if (ucp_ep->flags & UCP_EP_FLAG_CLOSED) {
/* if an EP was closed and not local connected anymore, not failed
* and no CLOSE request is set, it means that an EP was disconnected
* from a peer */
ucs_assert(ucp_ep->flags & UCP_EP_FLAG_DISCONNECTED_CM_LANE);
/* if an EP was closed and not local connected anymore (i.e.
* ucp_ep_cm_disconnect_cm_lane() was called from ucp_ep_close_nbx()),
* not failed and no CLOSE request is set, it means that an EP was
* disconnected from a peer */
ucs_assert((ucp_ep->flags & UCP_EP_FLAG_DISCONNECTED_CM_LANE) &&
!(ucp_ep->flags & UCP_EP_FLAG_ERR_HANDLER_INVOKED));
} else {
ucs_warn("ep %p: unexpected state on disconnect, flags: 0x%u",
ucp_ep, ucp_ep->flags);
Expand Down

0 comments on commit 1111358

Please sign in to comment.