summaryrefslogtreecommitdiff
path: root/src/core/servers.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-07 23:57:19 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-07 23:57:19 +0000
commit4eb054f4bb5cabc0427069b4524c1246d7d54359 (patch)
tree22895835e6f1b19a07d1487d76b1c2c64f7def09 /src/core/servers.c
parent9f28d164567245722fb7077184acb9f66e5721fb (diff)
downloadirssi-4eb054f4bb5cabc0427069b4524c1246d7d54359.zip
If one server fails because of DNS error, don't stop reconnecting to
entire chatnet. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1361 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/servers.c')
-rw-r--r--src/core/servers.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/servers.c b/src/core/servers.c
index 4b91f846..cc9d0890 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -28,7 +28,6 @@
#include "rawlog.h"
#include "settings.h"
-
#include "chat-protocols.h"
#include "servers.h"
#include "servers-reconnect.h"
@@ -196,13 +195,10 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
handle = ip == NULL ? NULL : net_connect_ip(ip, port, own_ip);
if (handle == NULL) {
/* failed */
- if (iprec.error == 0 || !net_hosterror_notfound(iprec.error)) {
- /* reconnect back only if either
- 1) connect() failed
- 2) host name lookup failed not because the host
- wasn't found, but because there was some
- other error in nameserver */
- server->connection_lost = TRUE;
+ if (iprec.error != 0 && net_hosterror_notfound(iprec.error)) {
+ /* IP wasn't found for the host, don't try to reconnect
+ back to this server */
+ server->dns_error = TRUE;
}
if (iprec.error == 0) {
@@ -213,6 +209,7 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
errormsg = iprec.errorstr != NULL ? iprec.errorstr :
"Host lookup failed";
}
+ server->connection_lost = TRUE;
server_connect_failed(server, errormsg);
g_free_not_null(iprec.errorstr);
return;