mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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
|
applications. twistedDrivers is very stable and simple, and if you've got
|
||||||
Twisted installed, is probably your best bet."""))
|
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.
|
# supybot.directories, for stuff relating to directories.
|
||||||
###
|
###
|
||||||
|
@ -108,8 +108,7 @@ def errorMsg(reason):
|
|||||||
return reason.getErrorMessage()
|
return reason.getErrorMessage()
|
||||||
|
|
||||||
class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
|
class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
|
||||||
# XXX Shouldn't the maxDelay be configurable?
|
maxDelay = property(lambda self: conf.supybot.drivers.maxReconnectWait())
|
||||||
maxDelay = 300
|
|
||||||
protocol = SupyIrcProtocol
|
protocol = SupyIrcProtocol
|
||||||
def __init__(self, irc):
|
def __init__(self, irc):
|
||||||
self.irc = irc
|
self.irc = irc
|
||||||
|
Loading…
Reference in New Issue
Block a user