Fix issue when a client connection is lost that has been authenticated

This commit is contained in:
Andrew Resch 2009-02-10 08:35:41 +00:00
parent 8bcc7ea232
commit 9175ac16fd

View File

@ -169,8 +169,10 @@ class DelugeRPCProtocol(Protocol):
# We need to remove this session from various dicts
del self.factory.authorized_sessions[self.transport.sessionno]
del self.factory.session_protocols[self.transport.sessionno]
del self.factory.interested_events[self.transport.sessionno]
if self.transport.sessionno in self.factory.session_protocols:
del self.factory.session_protocols[self.transport.sessionno]
if self.transport.sessionno in self.factory.interested_events:
del self.factory.interested_events[self.transport.sessionno]
log.info("Deluge client disconnected: %s", reason.value)