From 125336aeee630a789ce32ecdb976be6606656d93 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 20 Sep 2016 15:49:27 +0900 Subject: Remove locking from static disco. --- slixmpp/plugins/xep_0115/static.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'slixmpp/plugins/xep_0115/static.py') diff --git a/slixmpp/plugins/xep_0115/static.py b/slixmpp/plugins/xep_0115/static.py index 0d1caa01..d47c8fd8 100644 --- a/slixmpp/plugins/xep_0115/static.py +++ b/slixmpp/plugins/xep_0115/static.py @@ -124,23 +124,19 @@ class StaticCaps(object): return None def cache_caps(self, jid, node, ifrom, data): - with self.static.lock: - verstring = data.get('verstring', None) - info = data.get('info', None) - if not verstring or not info: - return - self.ver_cache[verstring] = info + verstring = data.get('verstring', None) + info = data.get('info', None) + if not verstring or not info: + return + self.ver_cache[verstring] = info def assign_verstring(self, jid, node, ifrom, data): - with self.static.lock: - if isinstance(jid, JID): - jid = jid.full - self.jid_vers[jid] = data.get('verstring', None) + if isinstance(jid, JID): + jid = jid.full + self.jid_vers[jid] = data.get('verstring', None) def get_verstring(self, jid, node, ifrom, data): - with self.static.lock: - return self.jid_vers.get(jid, None) + return self.jid_vers.get(jid, None) def get_caps(self, jid, node, ifrom, data): - with self.static.lock: - return self.ver_cache.get(data.get('verstring', None), None) + return self.ver_cache.get(data.get('verstring', None), None) -- cgit v1.2.3