Skip to content

Commit

Permalink
Merge pull request #145 from evgeny-leksikov/int3_ucp_fix_err_handling
Browse files Browse the repository at this point in the history
UCP/WORKER: err handler fix
  • Loading branch information
yosefe authored Jun 7, 2021
2 parents 169d997 + 6aeb722 commit 5b4b7ef
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/ucp/core/ucp_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ static unsigned ucp_worker_iface_err_handle_progress(void *arg)
}
}

ucp_stream_ep_cleanup(ucp_ep);

/* Move failed lane to index 0 */
if ((failed_lane != 0) && (failed_lane != UCP_NULL_LANE)) {
ucp_ep->uct_eps[0] = ucp_ep->uct_eps[failed_lane];
Expand Down Expand Up @@ -454,20 +452,18 @@ static unsigned ucp_worker_iface_err_handle_progress(void *arg)

ucp_ep->am_lane = 0;

if (!(ucp_ep->flags & UCP_EP_FLAG_USED)) {
ucs_debug("ep %p: destroy internal endpoint due to peer failure", ucp_ep);
ucp_ep_disconnected(ucp_ep, 1);
} else {
ucp_ep_invoke_err_cb(ucp_ep, key.status);
}

if (ucp_ep->flags & UCP_EP_FLAG_CLOSE_REQ_VALID) {
/* Promote close operation to CANCEL in case of transport error, since
* the disconnect event may never arrive.
*/
close_req = ucp_ep_ext_gen(ucp_ep)->close_req.req;
close_req->send.flush.uct_flags |= UCT_FLUSH_FLAG_CANCEL;
ucp_ep_local_disconnect_progress(close_req);
} else if (ucp_ep->flags & UCP_EP_FLAG_USED) {
ucp_ep_invoke_err_cb(ucp_ep, key.status);
} else {
ucs_debug("ep %p: destroy internal endpoint due to peer failure", ucp_ep);
ucp_ep_disconnected(ucp_ep, 1);
}

ucs_free(err_handle_arg);
Expand Down

0 comments on commit 5b4b7ef

Please sign in to comment.