matrix-org / synapse-s3-storage-provider

Synapse storage provider to fetch and store media in Amazon S3
Apache License 2.0
132 stars 36 forks source link

Make `_S3Responder` clean up resources on `__del__` #76

Open erikjohnston opened 2 years ago

erikjohnston commented 2 years ago

There was a bug in Synapse (https://github.com/matrix-org/synapse/pull/13660) where we didn't correctly call _S3Responder.__exit__, and so the resources were not correctly cleaned up (leading to threadpool exhaustion).

To help mitigate this we should add a __del__ that clears the resources (if not done already) and logs an error.