Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): T3 Connect no longer stays down after a network change #19335

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19335/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 122 additions and 3 deletions (loading 1).

x
0 of 2 viewed, 2 left
122 additions and 3 deletionsapps/server/src/cloud/ManagedEndpointRuntime.test.tsModified
View file
@@ -3,6 +3,7 @@
import * as Deferred from "effect/Deferred";
import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
+import * as Exit from "effect/Exit";
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
import * as Option from "effect/Option";
@@ -12,6 +13,7 @@
import * as Stream from "effect/Stream";
import * as TestClock from "effect/testing/TestClock";
import { ChildProcess, ChildProcessSpawner } from "effect/process";
+import { HttpClient, HttpClientError, HttpClientResponse } from "effect/http";
import type { RelayManagedEndpointRuntimeConfig } from "@t3tools/contracts/relay";
import * as RelayClient from "@t3tools/shared/relayClient";
​
@@ -33,12 +35,17 @@
}),
);
​
+// Only connectors that log a metrics address are polled for readiness.
+const unusedHttpClient = HttpClient.make(() => Effect.die("unused"));
+​
const runtimeDependencies = (
spawner: ReturnType<typeof ChildProcessSpawner.make>,
relayClientLayer = layerRelayClientAvailable,
+ httpClient = unusedHttpClient,
) =>