summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Wilke <git@joachim-wilke.de>2012-06-25 08:34:38 +0200
committerJoachim Wilke <git@joachim-wilke.de>2012-06-25 08:34:38 +0200
commit79475bfca5e9716909a09f7c2d9f21db3f7e2d58 (patch)
tree59982ccdd45713061d83ca0164f4eddf8c111cd7
parent7741399654fe4847bf037085ea38fe035cddd974 (diff)
downloadvdr-plugin-lcdproc-79475bfca5e9716909a09f7c2d9f21db3f7e2d58.tar.gz
vdr-plugin-lcdproc-79475bfca5e9716909a09f7c2d9f21db3f7e2d58.tar.bz2
Fix issue #1032
http://projects.vdr-developer.org/issues/1032
-rw-r--r--sockets.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sockets.c b/sockets.c
index 2df4fc7..a95d660 100644
--- a/sockets.c
+++ b/sockets.c
@@ -69,7 +69,7 @@ sock_connect (char *host, unsigned short int port)
err = connect (sock, (struct sockaddr *) &servername, sizeof (servername));
if (err < 0) {
perror ("sock_connect: connect failed");
- shutdown (sock, 2);
+ sock_close (sock);
return 0; // Normal exit if server doesn't exist...
}
@@ -84,8 +84,7 @@ sock_close (int fd)
int err;
err = shutdown (fd, 2);
- if (!err)
- close (fd);
+ close (fd);
return err;
}