[gtk-vnc] Try next DNS addr after all connect failures
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Try next DNS addr after all connect failures
- Date: Tue, 8 Jun 2010 19:23:26 +0000 (UTC)
commit 57fd4dee346601a75437494dd1b4306748be1aa1
Author: Daniel P. Berrange <berrange redhat com>
Date: Tue Jun 8 20:21:36 2010 +0100
Try next DNS addr after all connect failures
There are many more ways an IPv6 connection can fail than just
CONNREFUSED and HOSTUNREACH. For example ETIMEDOUT, NETUNREACH
and more. Try the next DNS addr after all connect() failures,
no matter what the errno code, to ensure we always fallback
to IPv4 eventually.
* src/vncconnection.c: Retry connection after all errors
src/vncconnection.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/vncconnection.c b/src/vncconnection.c
index cf18ed3..85bbe92 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -4381,13 +4381,8 @@ static gboolean vnc_connection_open_host_internal(VncConnection *conn)
errno == EWOULDBLOCK) {
g_io_wait(chan, G_IO_OUT|G_IO_ERR|G_IO_HUP);
goto reconnect;
- } else if (errno != ECONNREFUSED &&
- errno != EHOSTUNREACH) {
- g_io_channel_unref(chan);
- close(fd);
- VNC_DEBUG ("Failed with errno = %d", errno);
- break;
}
+ VNC_DEBUG ("Connect failed with errno = %d, try next addr", errno);
close(fd);
g_io_channel_unref(chan);
runp = runp->ai_next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]