From 95853924ad5e57e084ee6583fb633f7f00a01d09 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 17 Jul 2015 15:10:23 -0700 Subject: [PATCH] Revert "protocols/: thread calls to each event hook to prevent blocking globally" This reverts commit 99fd6060a7865f79694c52f4235f6ed05af29829, which caused a bunch of race conditions in relay :/ Ref #59. --- protocols/inspircd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index b4b593e..49d9f33 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -3,7 +3,6 @@ import sys import os import traceback import re -import threading from copy import copy sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) @@ -588,7 +587,7 @@ def handle_events(irc, data): for hook_func in utils.command_hooks[hook_cmd]: try: log.debug('Calling function %s', hook_func) - threading.Thread(target=hook_func, args=(irc, numeric, command, parsed_args)).start() + hook_func(irc, numeric, command, parsed_args) except Exception: # We don't want plugins to crash our servers... traceback.print_exc()