mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fix activation of SSL for connections using SOCKS.
This commit is contained in:
parent
4b1c766b42
commit
10522857b1
@ -274,9 +274,11 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
# At least 10 seconds.
|
||||
self.conn.settimeout(max(10, conf.supybot.drivers.poll()*10))
|
||||
try:
|
||||
# Connect before SSL, otherwise SSL is disabled if we use SOCKS.
|
||||
# See http://stackoverflow.com/q/16136916/539465
|
||||
self.conn.connect((address, server[1]))
|
||||
if getattr(conf.supybot.networks, self.irc.network).ssl():
|
||||
self.starttls()
|
||||
self.conn.connect((address, server[1]))
|
||||
def setTimeout():
|
||||
self.conn.settimeout(conf.supybot.drivers.poll())
|
||||
conf.supybot.drivers.poll.addCallback(setTimeout)
|
||||
|
Loading…
Reference in New Issue
Block a user