mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Made the maxReconnectWait configurable.
This commit is contained in:
parent
d5653077d3
commit
49e74670a4
@ -675,6 +675,11 @@ registerGlobalValue(supybot.drivers, 'module',
|
||||
applications. twistedDrivers is very stable and simple, and if you've got
|
||||
Twisted installed, is probably your best bet."""))
|
||||
|
||||
registerGlobalValue(supybot.drivers, 'maxReconnectWait',
|
||||
registry.PositiveFloat(300.0, """Determines the maximum time the bot will
|
||||
wait before attempting to reconnect to an IRC server. The bot may, of
|
||||
course, reconnect earlier if possible."""))
|
||||
|
||||
###
|
||||
# supybot.directories, for stuff relating to directories.
|
||||
###
|
||||
|
@ -108,8 +108,7 @@ def errorMsg(reason):
|
||||
return reason.getErrorMessage()
|
||||
|
||||
class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
|
||||
# XXX Shouldn't the maxDelay be configurable?
|
||||
maxDelay = 300
|
||||
maxDelay = property(lambda self: conf.supybot.drivers.maxReconnectWait())
|
||||
protocol = SupyIrcProtocol
|
||||
def __init__(self, irc):
|
||||
self.irc = irc
|
||||
|
Loading…
Reference in New Issue
Block a user