Compare commits
1 Commits
fix/882
...
fix/issue-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93b8475405 |
@@ -2880,7 +2880,7 @@ def main():
|
|||||||
# Start world tick system
|
# Start world tick system
|
||||||
world_tick_system.start()
|
world_tick_system.start()
|
||||||
|
|
||||||
server = HTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
server = ThreadingHTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,17 @@ import threading
|
|||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||||
|
from socketserver import ThreadingMixIn
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
|
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
|
||||||
|
"""Thread-per-request HTTP server."""
|
||||||
|
daemon_threads = True
|
||||||
|
|
||||||
# ── Configuration ──────────────────────────────────────────────────────
|
# ── Configuration ──────────────────────────────────────────────────────
|
||||||
|
|
||||||
BRIDGE_PORT = int(os.environ.get('TIMMY_BRIDGE_PORT', 4004))
|
BRIDGE_PORT = int(os.environ.get('TIMMY_BRIDGE_PORT', 4004))
|
||||||
@@ -274,7 +280,7 @@ def main():
|
|||||||
print(f" POST /bridge/move — Move user to room (user_id, room)")
|
print(f" POST /bridge/move — Move user to room (user_id, room)")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
server = HTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
server = ThreadingHTTPServer((BRIDGE_HOST, BRIDGE_PORT), BridgeHandler)
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user