mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
fix: Force connection close to prevent stale connections in scheduler
Added 'Connection: close' header to bridge requests to prevent connection pooling issues when running from APScheduler background thread context. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,7 @@ def _run_command(args: list, timeout: int = DEFAULT_TIMEOUT) -> Tuple[bool, str,
|
||||
'args': args,
|
||||
'timeout': timeout
|
||||
},
|
||||
headers={'Connection': 'close'}, # Prevent connection reuse issues in background threads
|
||||
timeout=timeout + 5 # Add 5s buffer for HTTP timeout
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user