Improve an error message to show the errno value
[deb_libnfs.git] / lib / socket.c
index 0f12697388779cd3f819bcf39c22227c0ddf225d..23c3f1028af169383a454ce8483e951e058af304 100644 (file)
@@ -411,7 +411,7 @@ static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_s
        if (connect(rpc->fd, (struct sockaddr *)s, socksize) != 0 && errno != EINPROGRESS) 
 #endif
        {
-               rpc_set_error(rpc, "connect() to server failed");
+         rpc_set_error(rpc, "connect() to server failed. %s(%d)", strerror(errno), errno);
                return -1;
        }