summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Taylor <bear42@gmail.com>2015-09-18 15:13:07 -0400
committerMike Taylor <bear42@gmail.com>2015-09-18 15:13:07 -0400
commit4fa5dedc47e46e68a9071946a3590567500f4db1 (patch)
treeb3c81add15bc717052fff53c3522a0ba95b64b4d
parent5525ef22851d42246782fa0adf1dc2b40e493840 (diff)
parent2042e1a4d5f5f859f5fece69abd42c4bfc1c4087 (diff)
downloadslixmpp-4fa5dedc47e46e68a9071946a3590567500f4db1.tar.gz
slixmpp-4fa5dedc47e46e68a9071946a3590567500f4db1.tar.bz2
slixmpp-4fa5dedc47e46e68a9071946a3590567500f4db1.tar.xz
slixmpp-4fa5dedc47e46e68a9071946a3590567500f4db1.zip
Merge pull request #386 from jdowner/develop-iot
iot: only add the 'done' field when all devices are done
-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()