mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +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.
|
# At least 10 seconds.
|
||||||
self.conn.settimeout(max(10, conf.supybot.drivers.poll()*10))
|
self.conn.settimeout(max(10, conf.supybot.drivers.poll()*10))
|
||||||
try:
|
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():
|
if getattr(conf.supybot.networks, self.irc.network).ssl():
|
||||||
self.starttls()
|
self.starttls()
|
||||||
self.conn.connect((address, server[1]))
|
|
||||||
def setTimeout():
|
def setTimeout():
|
||||||
self.conn.settimeout(conf.supybot.drivers.poll())
|
self.conn.settimeout(conf.supybot.drivers.poll())
|
||||||
conf.supybot.drivers.poll.addCallback(setTimeout)
|
conf.supybot.drivers.poll.addCallback(setTimeout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user