From 5222ce2f1dc6d96eef81e238a2f0713daa1b8e55 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Fri, 10 Feb 2012 12:38:08 +0000 Subject: [PATCH] Move window_check_servers() call out of loop, otherwise the client does a huge amount of work on each keystroke if you have a long server list and start it up disconnected (-N). git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@150 13b04d17-f746-0410-82c6-800466cd88b0 --- source/server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/server.c b/source/server.c index 7e60353..f02c8bb 100644 --- a/source/server.c +++ b/source/server.c @@ -595,8 +595,6 @@ static time_t last_timeout = 0; } from_server = primary_server; } - if (primary_server == -1 || !is_server_open(primary_server)) - window_check_servers(-1); if (server_list[i].read != -1 && (errno == ENETUNREACH || errno == EHOSTUNREACH)) { if (last_timeout == 0) @@ -609,6 +607,9 @@ static time_t last_timeout = 0; } } } + + if (primary_server == -1 || !is_server_open(primary_server)) + window_check_servers(-1); } /*