summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorJoshua Downer <joshua.downer@gmail.com>2015-07-20 17:34:09 -0400
committerJoshua Downer <joshua.downer@gmail.com>2015-07-20 17:34:09 -0400
commit2042e1a4d5f5f859f5fece69abd42c4bfc1c4087 (patch)
tree0a8489ce5e01026df48329a41e5bbfeaa805e2ff /sleekxmpp/plugins
parentbb094cc6498838cece046d9ed74881232fb5010d (diff)
downloadslixmpp-2042e1a4d5f5f859f5fece69abd42c4bfc1c4087.tar.gz
slixmpp-2042e1a4d5f5f859f5fece69abd42c4bfc1c4087.tar.bz2
slixmpp-2042e1a4d5f5f859f5fece69abd42c4bfc1c4087.tar.xz
slixmpp-2042e1a4d5f5f859f5fece69abd42c4bfc1c4087.zip
iot: only add the 'done' field when all devices are done
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0323/sensordata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0323/sensordata.py b/sleekxmpp/plugins/xep_0323/sensordata.py
index 87a62980..a3d4cf34 100644
--- a/sleekxmpp/plugins/xep_0323/sensordata.py
+++ b/sleekxmpp/plugins/xep_0323/sensordata.py
@@ -482,10 +482,10 @@ class XEP_0323(BasePlugin):
if result == "done":
self.sessions[session]["commTimers"][nodeId].cancel()
self.sessions[session]["nodeDone"][nodeId] = True
- msg['fields']['done'] = 'true'
if (self._all_nodes_done(session)):
# The session is complete, delete it
del self.sessions[session]
+ msg['fields']['done'] = 'true'
else:
# Restart comm timer
self.sessions[session]["commTimers"][nodeId].reset()