1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

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
This commit is contained in:
Timo Sirainen 2000-05-25 13:09:22 +00:00 committed by cras
parent 9c8516f2ee
commit 69d15cfd79

View File

@ -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 */