Author: damoxc

Revision: 5746

Log:
        stop a session from subscribing to the same event more than once server 
side

Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py     2009-09-14 15:56:09 UTC (rev 5745)
+++ trunk/deluge/ui/web/json_api.py     2009-09-14 16:04:52 UTC (rev 5746)
@@ -349,7 +349,7 @@
             client.register_event_handler(event, on_event)
             self.__handlers[event] = on_event
             self.__events[event] = [listener_id]
-        else:
+        elif listener_id not in self.__events[event]:
             self.__events[event].append(listener_id)
     
     def get_events(self, listener_id):



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to