Skip to content

Commit 68d370a

Browse files
TUN-6617: Dont fallback to http2 if QUIC conn was successful.
cloudflared falls back aggressively to HTTP/2 protocol if a connection attempt with QUIC failed. This was done to ensure that machines with UDP egress disabled did not stop clients from connecting to the cloudlfare edge. This PR improves on that experience by having cloudflared remember if a QUIC connection was successful which implies UDP egress works. In this case, cloudflared does not fallback to HTTP/2 and keeps trying to connect to the edge with QUIC.
1 parent 679a89c commit 68d370a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

component-tests/util.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ def cloudflared_cmd(config, config_path, cfd_args, cfd_pre_args, root):
6161
def run_cloudflared_background(cmd, allow_input, capture_output):
6262
output = subprocess.PIPE if capture_output else subprocess.DEVNULL
6363
stdin = subprocess.PIPE if allow_input else None
64+
cfd = None
6465
try:
6566
cfd = subprocess.Popen(cmd, stdin=stdin, stdout=output, stderr=output)
6667
yield cfd
6768
finally:
68-
cfd.terminate()
69-
if capture_output:
70-
LOGGER.info(f"cloudflared log: {cfd.stderr.read()}")
69+
if cfd:
70+
cfd.terminate()
71+
if capture_output:
72+
LOGGER.info(f"cloudflared log: {cfd.stderr.read()}")
7173

7274

7375
def wait_tunnel_ready(tunnel_url=None, require_min_connections=1, cfd_logs=None):

0 commit comments

Comments
 (0)