Rather than silently exiting when connection is refused by server, print error message (Connection refused) during async rconnect at client.
Signed-off-by: Hal Rosenstock <[email protected]> --- diff --git a/examples/riostream.c b/examples/riostream.c index c12dd0d..b6c9f86 100644 --- a/examples/riostream.c +++ b/examples/riostream.c @@ -470,8 +470,10 @@ static int client_connect(void) fds.fd = rs; fds.events = POLLOUT; ret = do_poll(&fds, poll_timeout); - if (ret) + if (ret) { + perror("rpoll"); goto close; + } len = sizeof err; ret = rgetsockopt(rs, SOL_SOCKET, SO_ERROR, &err, &len); diff --git a/examples/rstream.c b/examples/rstream.c index d93e9aa..4b76bbc 100644 --- a/examples/rstream.c +++ b/examples/rstream.c @@ -469,8 +469,10 @@ static int client_connect(void) fds.fd = rs; fds.events = POLLOUT; ret = do_poll(&fds, poll_timeout); - if (ret) + if (ret) { + perror("rpoll"); goto close; + } len = sizeof err; ret = rs_getsockopt(rs, SOL_SOCKET, SO_ERROR, &err, &len); -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
