Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(connect): recover a reaped tunnel the connector cannot register #16402

Closedberghtho(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/16402/headopened View on GitHub

Showing 2 changed files with 101 additions and 7 deletions.

x
0 of 2 viewed, 2 left
77 additions and 0 deletionsapps/server/src/cloud/ManagedEndpointRuntime.test.tsModified
View file
@@ -190,6 +190,30 @@
'2026-06-17T02:00:00Z ERR Register tunnel error from server side error="connection timed out" connIndex=0',
).toBe(false);
+ // The edge's reason for a tunnel the relay reaper deleted.
+ expect(
+ ManagedEndpointRuntime.isRejectedRelayClientTunnelOutput(
+ '2026-10-06T06:44:22Z ERR Register tunnel error from server side error="Unauthorized: Tunnel not found" connIndex=0 event=0 ip=198.41.200.43',
+ ),
+ ).toBe(true);
+ // Over QUIC, cloudflared hides the edge's reason behind an opaque control
+ // stream failure. Only the supervisor's per-attempt line counts; the
+ // connection-level line repeats the same error for the same attempt.
+ expect(
+ ManagedEndpointRuntime.isRejectedRelayClientTunnelOutput(
+ '2026-10-06T06:43:35Z ERR Serve tunnel error error="control stream encountered a failure while serving" connIndex=0 event=0 ip=198.41.200.43',
+ ),
+ ).toBe(true);
+ expect(
+ ManagedEndpointRuntime.isRejectedRelayClientTunnelOutput(
+ '2026-10-06T06:43:35Z ERR failed to serve tunnel connection error="control stream encountered a failure while serving" connIndex=0 event=0 ip=198.41.200.43',
+ ),
+ ).toBe(false);
+ expect(
+ ManagedEndpointRuntime.isRejectedRelayClientTunnelOutput(
+ '2026-10-06T06:43:35Z ERR Serve tunnel error error="failed to accept QUIC stream: timeout: no recent network activity" connIndex=0 event=0 ip=198.41.200.43',
+ ),
+ ).toBe(false);
});
​