Fixed discard method
[gregoa/zavai.git] / zavai / registry.py
index 3144a899db8cd951d5a91619152f1f8b3370076b..67f4c78f6aa737971898455de44d75c07b481584 100644 (file)
@@ -201,6 +201,6 @@ class Service(Resource):
     def disconnect(self, type, callback):
         "Disconnect a callback to this resource, activating it if needed"
         if not self.has_callbacks(): return
-        self.callbacks.discard(callback)
+        self.callbacks[type].discard(callback)
         if not self.has_callbacks():
             self.stop()