From 79475bfca5e9716909a09f7c2d9f21db3f7e2d58 Mon Sep 17 00:00:00 2001 From: Joachim Wilke Date: Mon, 25 Jun 2012 08:34:38 +0200 Subject: Fix issue #1032 http://projects.vdr-developer.org/issues/1032 --- sockets.c | 5 ++--- 1 file 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; } -- cgit v1.2.3