Closed n0vad3v closed 8 months ago
ghcr.io/webp-sh/webp_server_go (debian 12.4)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
This can also be the potential cause described in https://github.com/webp-sh/webp_server_go/issues/213.
In some cases when multiple concurrent requests are made to WebP Server, for example to a image with size of 10MiB, when the conversion is on-going, WebP Server will spawn multiple threads per request to convert the same image, which is not good and can exhaust all server resources in some condition.
This PR added a Lock called
ConvertLock
to prevent this from happening, thus there will be only one thread for converting a specific image at any given moment.