mirror of
https://github.com/immich-app/immich.git
synced 2025-12-27 21:23:57 -08:00
Fixes the intermittent EPIPE errors that myself and others are seeing. By explicitly returning a promise we ensure the caller correctly waits until the `sendFile` is complete before potentially closing or cleaning the socket. This is the most likely bug that would cause EPIPE errors. Fix was confirmed on a live system -- would benefit from a unit test though.