summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-02-27 10:27:03 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-02-27 10:27:03 +0000
commit12026ef17e2071f8b65800384e1889ed846da2d3 (patch)
treec776dfd810d81f49f55de706ffd0397b80332686 /src/irc
parent46234f050474fe0b4cbece05f206b308f9d8ef3a (diff)
downloadweechat-12026ef17e2071f8b65800384e1889ed846da2d3.zip
Fixed bug with disconnection (was causing high cpu usage)
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-server.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index 191ef7dc9..ce166aa5a 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -953,10 +953,6 @@ server_disconnect (t_irc_server *server, int reconnect)
{
t_irc_channel *ptr_channel;
- /* not connected/connecting to server */
- if (!server->is_connected && (server->child_pid == 0))
- return;
-
if (server->is_connected)
{
/* write disconnection message on each channel/private buffer */
@@ -969,11 +965,11 @@ server_disconnect (t_irc_server *server, int reconnect)
}
}
+ server_close_connection (server);
+
irc_display_prefix (server->buffer, PREFIX_INFO);
gui_printf (server->buffer, _("Disconnected from server!\n"));
- server_close_connection (server);
-
server->is_away = 0;
server->away_time = 0;
server->lag = 0;