added support for Twisted2.0 by preventing the twisted reactor from spawning threads for dns queries.

This commit is contained in:
Ali Afshar 2006-02-14 23:45:51 +00:00
parent a3e4fc5b1d
commit 26c0adf768

View File

@ -35,10 +35,17 @@ import supybot.ircdb as ircdb
import supybot.drivers as drivers import supybot.drivers as drivers
import supybot.ircmsgs as ircmsgs import supybot.ircmsgs as ircmsgs
from twisted.names import client
from twisted.internet import reactor, error from twisted.internet import reactor, error
from twisted.protocols.basic import LineReceiver from twisted.protocols.basic import LineReceiver
from twisted.internet.protocol import ReconnectingClientFactory from twisted.internet.protocol import ReconnectingClientFactory
# This hack prevents the standard Twisted resolver from starting any
# threads, which allows for a clean shut-down in Twisted>=2.0
reactor.installResolver(client.createResolver())
try: try:
from OpenSSL import SSL from OpenSSL import SSL
from twisted.internet import ssl from twisted.internet import ssl