aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dvbinfo/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dvbinfo/tcp.c')
-rw-r--r--examples/dvbinfo/tcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/dvbinfo/tcp.c b/examples/dvbinfo/tcp.c
index 481f273..cae9849 100644
--- a/examples/dvbinfo/tcp.c
+++ b/examples/dvbinfo/tcp.c
@@ -80,7 +80,7 @@ int tcp_close(int fd)
{
int result = 0;
- result = shutdown(fd, 2);
+ result = shutdown(fd, SHUT_RDWR);
if (result < 0)
perror("tcp shutdown error");
return result;
@@ -149,6 +149,8 @@ int tcp_open(const char *ipaddress, int port)
perror( "tcp connect error" );
continue;
}
+
+ break; /* success */
}
freeaddrinfo(addr);

Privacy Policy