Skip to content

Commit

Permalink
Socket driver: Apply supybot.drivers.poll as soon as modified (do not…
Browse files Browse the repository at this point in the history
… require reconnect).
  • Loading branch information
progval committed Oct 10, 2012
1 parent aff8cd3 commit 6b881d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/drivers/Socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ def reconnect(self, reset=True):
self.conn.settimeout(max(10, conf.supybot.drivers.poll()*10))
try:
self.conn.connect(server)
self.conn.settimeout(conf.supybot.drivers.poll())
def setTimeout():
self.conn.settimeout(conf.supybot.drivers.poll())
conf.supybot.drivers.poll.addCallback(setTimeout)
setTimeout()
if getattr(conf.supybot.networks, self.irc.network).ssl():
assert globals().has_key('ssl')
self.conn = ssl.wrap_socket(self.conn)
Expand Down

0 comments on commit 6b881d6

Please sign in to comment.