diff src/plugins/plugin_xep_0047.py @ 403:c513328ade9d

plugins XEP-0047 and XEP-0065: timout bug fix
author Goffi <goffi@goffi.org>
date Fri, 07 Oct 2011 12:09:48 +0200
parents 8f3551ceee17
children 6a1c6c41b91b
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0047.py	Fri Oct 07 11:19:15 2011 +0200
+++ b/src/plugins/plugin_xep_0047.py	Fri Oct 07 12:09:48 2011 +0200
@@ -296,6 +296,9 @@
             self.terminateStream(sid, "IQ_ERROR")
             return
         
+        if data['timer'].active():
+            data['timer'].cancel()
+        
         buffer = data["file_obj"].read(data["block_size"])
         if buffer:
             next_iq_elt = client.IQ(data["xmlstream"],'set')