Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/ucp/core/ucp_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -2286,16 +2286,17 @@ ucp_worker_discard_uct_ep_pending_cb(uct_pending_req_t *self)
uct_ep_h uct_ep = req->send.discard_uct_ep.uct_ep;
ucs_status_t status;

++req->send.state.uct_comp.count;
status = uct_ep_flush(uct_ep, req->send.discard_uct_ep.ep_flush_flags,
&req->send.state.uct_comp);
if (status == UCS_OK) {
ucs_assert(req->send.state.uct_comp.count == 0);
ucp_worker_discard_uct_ep_flush_comp(&req->send.state.uct_comp);
return UCS_OK;
} else if (status == UCS_INPROGRESS) {
req->send.state.uct_comp.count++;
if (status == UCS_INPROGRESS) {
return UCS_OK;
} else if (status == UCS_ERR_NO_RESOURCE) {
}

--req->send.state.uct_comp.count;
ucs_assert(req->send.state.uct_comp.count == 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why assert == 0, are we use it started with 0? maybe assert >= 0?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it should be either 0 or 1


if (status == UCS_ERR_NO_RESOURCE) {
return UCS_ERR_NO_RESOURCE;
}

Expand Down