From a4b05abce6431b606ff958d61ab03d022e940711 Mon Sep 17 00:00:00 2001 From: Henry Rawas Date: Wed, 6 Jul 2011 17:01:20 -0700 Subject: [PATCH] optional IPv6 for echo-server --- test/echo-server.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/echo-server.c b/test/echo-server.c index ab5491c2..8486d087 100644 --- a/test/echo-server.c +++ b/test/echo-server.c @@ -193,17 +193,18 @@ static int echo_start(int port) { return 1; } + /* IPv6 is optional as not all platforms support it */ r = uv_tcp_bind6(&server6, addr6); if (r) { - /* TODO: Error codes */ - fprintf(stderr, "Bind6 error\n"); - return 1; + /* show message but return OK */ + fprintf(stderr, "IPv6 not supported\n"); + return 0; } r = uv_tcp_listen(&server6, 128, on_connection); if (r) { /* TODO: Error codes */ - fprintf(stderr, "Listen error\n"); + fprintf(stderr, "Listen error on IPv6\n"); return 1; }