diff --git a/plugins/plugin_xep_0065.py b/plugins/plugin_xep_0065.py index 94cfee06..d6af0d37 100755 --- a/plugins/plugin_xep_0065.py +++ b/plugins/plugin_xep_0065.py @@ -354,15 +354,19 @@ class SOCKSv5(protocol.Protocol, FileSender): def getProgress(self, data): """Fill data with position of current transfert""" - data["size"] = self.filesize try: data["position"] = str(self.dest_file.tell()) + data["size"] = self.filesize except (ValueError, AttributeError): - data["position"] = "" + pass def fileTransfered(self, d): info(_("File transfer completed, closing connection")) self.transport.loseConnection() + try: + self.dest_file.close() + except: + pass def updateTransfered(self, data): self.transfered+=len(data)