aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2016-11-21 10:17:12 -0800
committerGravatar GitHub <noreply@github.com>2016-11-21 10:17:12 -0800
commit2ef2d2a516344f3f46858e8badda842ee6a69d18 (patch)
tree476e800fb233141a59baecc2c81ce3b5528289bf /src
parenteed43d91288dace33ad0279bee81b08d103c0bb5 (diff)
parent19badff717ef3a7858486737af6265d86e9c1bcb (diff)
Merge pull request #8804 from dgquintas/tcp_client_error
tcp_client_posix: Don't overwrite error descr.
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c
index 13347735df..a3a70a8ed7 100644
--- a/src/core/lib/iomgr/tcp_client_posix.c
+++ b/src/core/lib/iomgr/tcp_client_posix.c
@@ -251,8 +251,11 @@ finish:
done = (--ac->refs == 0);
gpr_mu_unlock(&ac->mu);
if (error != GRPC_ERROR_NONE) {
- error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION,
- "Failed to connect to remote host");
+ char *error_descr;
+ gpr_asprintf(&error_descr, "Failed to connect to remote host: %s",
+ grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION));
+ error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, error_descr);
+ gpr_free(error_descr);
error =
grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, ac->addr_str);
}