From f58af3cb3a3e826d21fd521fe5a55b993d8a348e Mon Sep 17 00:00:00 2001 From: UltraQbik Date: Mon, 26 Aug 2024 04:06:47 +0300 Subject: Fix major issue with threading and potential bugs Thread list was not cleared, so it was accumulating a ton of dead threads, now it should be fixed, as each thread removes itself at the end of request Added limit to how much data the client can send, as currently client data streams are unsupported Do minor renaming and allow to switch between HTTP and HTTPs --- src/config.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/config.py') diff --git a/src/config.py b/src/config.py index eefe1ad..18c136b 100644 --- a/src/config.py +++ b/src/config.py @@ -1,6 +1,8 @@ # generic -BUFFER_LENGTH = 65536 +BUFFER_LENGTH = 65536 # 64 KiB +BUFFER_MAX_SIZE = 2**30 * 0.5 # 512 MiB +CLIENT_MAX_AMOUNT = 64 # API -API_FILE_RANDOM_MIN_SIZE_LIMIT = 1 -API_FILE_RANDOM_MAX_SIZE_LIMIT = 2**30 * 5 +API_FILE_RANDOM_MIN_SIZE_LIMIT = 1 # 1 byte +API_FILE_RANDOM_MAX_SIZE_LIMIT = 2**30 * 5 # 5 GiB -- cgit 1.4.1