diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-11-19 21:27:00 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-11-19 21:27:00 +0100 |
commit | 0aff0ef66f28b9ad034424a5e4ebc90cd1f6fe35 (patch) | |
tree | 932a7cd008eef4fcc813ba1519d21e8a09bfdd5d | |
parent | b384b4257c698ee195e53e2adfd8d202b508d539 (diff) | |
download | weechat-0aff0ef66f28b9ad034424a5e4ebc90cd1f6fe35.zip |
Fix high CPU usage during gnutls handshake
-rw-r--r-- | src/core/wee-network.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 972cbfdac..ae19be861 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -1,6 +1,7 @@ /* * Copyright (C) 2003-2010 Sebastien Helleu <flashcode@flashtux.org> * Copyright (C) 2005-2010 Emmanuel Bouthenot <kolter@openics.org> + * Copyright (C) 2010 Gu1ll4um3r0m41n <aeroxteam@gmail.com> * * This file is part of WeeChat, the extensible chat client. * @@ -892,6 +893,8 @@ network_connect_child_read_cb (void *arg_hook_connect, int fd) * blocking: non fatal error, we just have to wait for an * event about handshake */ + unhook (HOOK_CONNECT(hook_connect, hook_fd)); + HOOK_CONNECT(hook_connect, hook_fd) = NULL; direction = gnutls_record_get_direction (*HOOK_CONNECT(hook_connect, gnutls_sess)); HOOK_CONNECT(hook_connect, handshake_ip_address) = ip_address; HOOK_CONNECT(hook_connect, handshake_hook_fd) = |