aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-02-12 04:36:45 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-02-12 04:36:45 +0000
commit88a88f609f2bd14122d0306a6509ebd539a52217 (patch)
treec93bb885f433f8b3e25857303ebda73133f53300 /socket.c
parent48832b032344d1d2ec92ce07b052b8ab096ee57a (diff)
downloadfetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.tar.gz
fetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.tar.bz2
fetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.zip
Don't go through elaborate shutdown just after connect.
svn path=/trunk/; revision=2739
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c8
1 files changed, 4 insertions, 4 deletions
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;