Permalink
Browse files

Socket driver: Apply supybot.drivers.poll as soon as modified (do not…

… require reconnect).
  • Loading branch information...
1 parent aff8cd3 commit 6b881d6509ee06b90b27d517aae7357b35dcc837 @ProgVal committed Oct 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/drivers/Socket.py
View
@@ -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)

0 comments on commit 6b881d6

Please sign in to comment.