examples/r[io]stream.c: Better handling of rpoll errors during client async rconnect
PATCH 1/1 examples/r[io]stream.c: Better handling of rpoll errors during client async rconnect
Rather than silently exiting when connection is refused by server, print error message (Connection refused) during async rconnect at client.
---
examples/riostream.c +3 -1
@@ -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);
examples/rstream.c +3 -1
@@ -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