This commit is contained in:
Jeremy Fincher 2004-09-29 14:35:58 +00:00
parent c2445cc7db
commit 24641b6efe

View File

@ -72,15 +72,19 @@ class SupyIrcProtocol(LineReceiver):
self.transport.write(str(msg)) self.transport.write(str(msg))
self.mostRecentCall = reactor.callLater(1, self.checkIrcForMsgs) self.mostRecentCall = reactor.callLater(1, self.checkIrcForMsgs)
def connectionLost(self, failure): def connectionLost(self, r):
self.irc.reset()
self.mostRecentCall.cancel() self.mostRecentCall.cancel()
drivers.log.disconnect(self.factory.currentServer, errorMsg(failure)) if not r.check(error.ConnectionDone):
drivers.log.disconnect(self.factory.currentServer, errorMsg(r))
else:
drivers.log.disconnect(self.factory.currentServer)
if self.irc.zombie: if self.irc.zombie:
# Let's take and take and take until our IRC is DESTROYED! # Let's take and take and take until our IRC is DESTROYED!
x = 1 x = 1
while x: while x:
x = self.irc.takeMsg() x = self.irc.takeMsg()
else:
self.irc.reset()
def connectionMade(self): def connectionMade(self):
self.factory.resetDelay() self.factory.resetDelay()
@ -126,9 +130,6 @@ class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
protocol.irc = self.irc protocol.irc = self.irc
return protocol return protocol
def die(self):
pass
Driver = SupyReconnectingFactory Driver = SupyReconnectingFactory
try: try: