From 5d71a6c9b9fc0e7a2b84959731633bbc7d345146 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 30 May 2024 10:36:04 +0100 Subject: Force flush + close of FD --- synapse/media/media_storage.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'synapse') 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 = ( -- cgit 1.4.1