diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-25 13:09:22 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-25 13:09:22 +0000 |
commit | 69d15cfd79a46f5e32905bd1dfaa90cc1847d3af (patch) | |
tree | a9b467f42bf4e632b67ee70a6c8e27b468aa594d | |
parent | 9c8516f2eef320f956b95f1446cac301a1b9a639 (diff) | |
download | irssi-69d15cfd79a46f5e32905bd1dfaa90cc1847d3af.zip |
If server's host name lookup fails, don't try to reconnect back to it.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@235 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/server.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/server.c b/src/core/server.c index 920b0b9a..98cbce54 100644 --- a/src/core/server.c +++ b/src/core/server.c @@ -147,7 +147,12 @@ static void server_connect_callback_readpipe(SERVER_REC *server, int handle) conn->own_ip != NULL ? conn->own_ip : NULL); if (server->handle == -1) { /* failed */ - server->connection_lost = TRUE; + if (iprec.error != -1) { + /* reconnect only if connect() was the one that + failed, if host lookup failed we most probably + don't want to try reconnecting back. */ + server->connection_lost = TRUE; + } server_cant_connect(server, iprec.error != -1 ? g_strerror(errno) : /* connect() failed */ (iprec.errorstr != NULL ? iprec.errorstr : "Host lookup failed")); /* gethostbyname() failed */ |