3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

Revert "protocols/: thread calls to each event hook to prevent blocking globally"

This reverts commit 99fd6060a7, which caused a bunch of race conditions in relay :/

Ref #59.
This commit is contained in:
James Lu 2015-07-17 15:10:23 -07:00
parent f41e1a2eb5
commit 95853924ad

View File

@ -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()