Signed-off-by: Sean Hefty <sean.he...@intel.com>
---
 examples/rstream.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/examples/rstream.c b/examples/rstream.c
index 104b318..c440f04 100644
--- a/examples/rstream.c
+++ b/examples/rstream.c
@@ -448,7 +448,8 @@ static int client_connect(void)
 {
        struct addrinfo *res;
        struct pollfd fds;
-       int ret, rs;
+       int ret, rs, err;
+       socklen_t len;
 
        ret = getaddrinfo(dst_addr, port, NULL, &res);
        if (ret) {
@@ -477,6 +478,17 @@ static int client_connect(void)
                ret = do_poll(&fds);
                if (ret)
                        goto err;
+
+               len = sizeof err;
+               ret = rs_getsockopt(rs, SOL_SOCKET, SO_ERROR, &err, &len);
+               if (ret)
+                       goto err;
+               if (err) {
+                       ret = -1;
+                       errno = err;
+                       perror("async rconnect");
+                       goto err;
+               }
        }
 
 free:


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to