summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/leap/soledad/server/sync.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/sync.py b/server/src/leap/soledad/server/sync.py
index 6f2ffe9f..c958bfaa 100644
--- a/server/src/leap/soledad/server/sync.py
+++ b/server/src/leap/soledad/server/sync.py
@@ -254,7 +254,11 @@ class SyncResource(http_app.SyncResource):
gen=gen, trans_id=trans_id)
self.responder.stream_entry(entry)
content = doc.get_json()
- self.responder.stream_entry(content.read() if content else '')
+ if content:
+ self.responder.stream_entry(content.read())
+ content.close()
+ else:
+ self.responder.stream_entry('')
new_gen, number_of_changes = \
self.sync_exch.find_changes_to_return(received)