# HG changeset patch # User Goffi # Date 1306331116 -7200 # Node ID 7f106052326f2e8f3531d44c958810a3e80fdcf4 # Parent 2744dd31e8a50e3be24a291c4c9d4da2d6b92f4b server side: user is now disconnected on session end, and queue is purged diff -r 2744dd31e8a5 -r 7f106052326f libervia.tac --- a/libervia.tac Wed May 25 14:24:41 2011 +0200 +++ b/libervia.tac Wed May 25 15:45:16 2011 +0200 @@ -273,6 +273,18 @@ error (_('/!\\ Session has already a profile, this should NEVER happen !')) sat_session.profile = profile self.sat_host.prof_connected.add(profile) + + def onExpire(): + try: + #We purge the queue + del self.sat_host.signal_handler.queue[profile] + except KeyError: + pass + #and now we deconnect the profile + self.sat_host.bridge.disconnect(profile) + + _session.notifyOnExpire(onExpire) + d = defer.Deferred() self.sat_host.bridge.getMblogNodes(profile, d.callback, d.errback) d.addCallback(self._fillMblogNodes, _session) @@ -314,7 +326,7 @@ self.register=None self.sat_host=sat_host self.signalDeferred = {} - self.queue = {} #XXX: gof: don't forgot to purge queue on session end + self.queue = {} def plugRegister(self, register): self.register = register