aboutsummaryrefslogtreecommitdiff
path: root/gemini-from-http
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2026-09-10 10:57:49 +0200
committeralex <alex@pdp7.net>2026-09-10 10:57:49 +0200
commit5d40fbeba853e6ca80736778c889a51e2de027b4 (patch)
tree0baabaf0c56c1494e0d90876e928c08e364afdb1 /gemini-from-http
parentb521f98502e0451e9939291100fb62cf47315a50 (diff)
Make server threaded
A scraper was hogging my personal Gemini server and making it unavailable
Diffstat (limited to 'gemini-from-http')
-rwxr-xr-xgemini-from-http/proxy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gemini-from-http/proxy.py b/gemini-from-http/proxy.py
index 8a4ba85..ca4846c 100755
--- a/gemini-from-http/proxy.py
+++ b/gemini-from-http/proxy.py
@@ -70,8 +70,8 @@ def main():
global proxied_hosts
proxied_hosts = args.proxied_host
- socketserver.TCPServer.allow_reuse_address = True
- with socketserver.TCPServer((args.host, args.port), Handler) as server:
+ socketserver.ThreadingTCPServer.allow_reuse_address = True
+ with socketserver.ThreadingTCPServer((args.host, args.port), Handler) as server:
server.serve_forever()