summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-05-30 10:36:04 +0100
committerErik Johnston <erik@matrix.org>2024-05-30 10:36:04 +0100
commit5d71a6c9b9fc0e7a2b84959731633bbc7d345146 (patch)
tree524e967ad438503d76bf1012c7daf661e05fbbd4 /synapse
parentNewsfile (diff)
downloadsynapse-5d71a6c9b9fc0e7a2b84959731633bbc7d345146.tar.xz
Force flush + close of FD
Diffstat (limited to 'synapse')
-rw-r--r--synapse/media/media_storage.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/media/media_storage.py b/synapse/media/media_storage.py
index b3cd3fd8f4..c24b7a10cd 100644
--- a/synapse/media/media_storage.py
+++ b/synapse/media/media_storage.py
@@ -141,6 +141,8 @@ class MediaStorage:
             with start_active_span("writing to main media repo"):
                 with open(fname, "wb") as f:
                     yield f, fname
+                    f.flush()
+                    f.close()
 
             with start_active_span("writing to other storage providers"):
                 spam_check = (