mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-06-22 20:00:16 +00:00
905d983d14
Pipes have a finite OS buffer (\~64KB Linux, \~4KB macOS, \~4KB Windows). Since nobody was reading stdout/stderr during the process lifetime, cloudflared would block once the buffer filled up. The post-terminate()/read() could only get whatever fit in the buffer, causing truncated logs. There was also a race between terminate() and read(): the process might not have flushed its final output yet. We're also deleting `test_default_only`. Since we changed `edge-ip-version` to auto, this test became redundant.
22 lines
601 B
Python
22 lines
601 B
Python
METRICS_PORT = 51000
|
|
MAX_RETRIES = 5
|
|
BACKOFF_SECS = 7
|
|
MAX_LOG_LINES = 50
|
|
|
|
MANAGEMENT_HOST_NAME = "management.argotunnel.com"
|
|
|
|
# How long to wait for the cloudflared process to exit after SIGTERM before
|
|
# sending SIGKILL.
|
|
GRACEFUL_SHUTDOWN_TIMEOUT = 10
|
|
# How long to wait for each pipe reader thread to finish after the process
|
|
# exits.
|
|
READER_THREAD_JOIN_TIMEOUT = 5
|
|
# How long to wait for an expected log message to appear before giving up.
|
|
LOG_POLL_TIMEOUT = 30
|
|
# How often to re-check the accumulated log lines while polling.
|
|
LOG_POLL_INTERVAL = 0.5
|
|
|
|
|
|
def protocols():
|
|
return ["http2", "quic"]
|