aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
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;