Skip to content

Commit

Permalink
UCP/STREAM: fix a race condition when connecting to sockaddr
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-leksikov committed Apr 20, 2021
1 parent a8dee8a commit 508779d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ucp/stream/stream_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb,

UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM,
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM));
UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker);
UCS_ASYNC_BLOCK(&ep->worker->async);

ucs_trace_req("stream_send_nb buffer %p count %zu to %s cb %p flags %u",
buffer, count, ucp_ep_peer_name(ep), cb, flags);
Expand Down Expand Up @@ -135,7 +135,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb,
ucp_ep_config(ep)->stream.proto);

out:
UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker);
UCS_ASYNC_UNBLOCK(&ep->worker->async);
return ret;
}

Expand Down

0 comments on commit 508779d

Please sign in to comment.