Skip to content

Commit c4322e8

Browse files
committed
librdmacm: Run connect service with TCP protocol
To allow us to respond to disconnect events initiated by the peer kernel CM, run the connect service always with TCP protocol- also when connection succeeds. Signed-off-by: Batsheva Black <bblack@nvidia.com>
1 parent b9c6617 commit c4322e8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

librdmacm/rsocket.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,12 +1775,12 @@ int rconnect(int socket, const struct sockaddr *addr, socklen_t addrlen)
17751775
if (rs->type == SOCK_STREAM) {
17761776
memcpy(&rs->cm_id->route.addr.dst_addr, addr, addrlen);
17771777
ret = rs_do_connect(rs);
1778-
if (ret == -1 && errno == EINPROGRESS) {
1779-
save_errno = errno;
1780-
/* The app can still drive the CM state on failure */
1781-
rs_notify_svc(&connect_svc, rs, RS_SVC_ADD_CM);
1782-
errno = save_errno;
1783-
}
1778+
save_errno = errno;
1779+
/* The app can still drive the CM state on failure,
1780+
* and can respond to disconnect requests
1781+
*/
1782+
rs_notify_svc(&connect_svc, rs, RS_SVC_ADD_CM);
1783+
errno = save_errno;
17841784
} else {
17851785
if (rs->state == rs_init) {
17861786
ret = ds_init_ep(rs);

0 commit comments

Comments
 (0)