From 88a88f609f2bd14122d0306a6509ebd539a52217 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 12 Feb 2000 04:36:45 +0000 Subject: Don't go through elaborate shutdown just after connect. svn path=/trunk/; revision=2739 --- socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'socket.c') diff --git a/socket.c b/socket.c index 9008a66d..e91d34b7 100644 --- a/socket.c +++ b/socket.c @@ -163,7 +163,7 @@ int SockOpen(const char *host, const char *service, const char *options, } if (connect(i, (struct sockaddr *) ai->ai_addr, ai->ai_addrlen) < 0) { freeaddrinfo(ai); - SockClose(i); + close(i); /* don't use SockClose, no traffic yet */ return -1; } #endif @@ -226,7 +226,7 @@ int SockOpen(const char *host, int clientPort, const char *options, if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) < 0) { int olderr = errno; - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ h_errno = 0; errno = olderr; return -1; @@ -272,14 +272,14 @@ int SockOpen(const char *host, int clientPort, const char *options, memcpy(&ad.sin_addr, *pptr, sizeof(struct in_addr)); if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) == 0) break; /* success */ - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ memset(&ad, 0, sizeof(ad)); ad.sin_family = AF_INET; } if(*pptr == NULL) { int olderr = errno; - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ h_errno = 0; errno = olderr; return -1; -- cgit v1.2.3