summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-10-04 19:11:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-10-04 19:11:07 (GMT)
commitfb0c1827eb055322b7c6f0c5dc80673dbbbf1f9f (patch)
tree4f11fdc2ff7495b044462f50914fa481095f1808 /unix/tclUnixSock.c
parenta9141cc7056ed9c6778e8fcfb770fcdef7cae3a6 (diff)
downloadtcl-fb0c1827eb055322b7c6f0c5dc80673dbbbf1f9f.zip
tcl-fb0c1827eb055322b7c6f0c5dc80673dbbbf1f9f.tar.gz
tcl-fb0c1827eb055322b7c6f0c5dc80673dbbbf1f9f.tar.bz2
[4d5ae7d88a] Stop crashes with asynchronous connects to hosts without addresses.
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 9c5cd4b..ca8d677 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1098,7 +1098,7 @@ TcpConnect(
{
socklen_t optlen;
int async_callback = statePtr->flags & TCP_ASYNC_PENDING;
- int ret = -1, error = errno;
+ int ret = -1, error = EHOSTUNREACH;
int async = statePtr->flags & TCP_ASYNC_CONNECT;
if (async_callback) {