Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client): a frozen host no longer shows a heartbeat as slow or blames your DNS #22212

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

Showing 10 changed files with 16 additions and 8 deletions (loading 7).

x
0 of 10 viewed, 10 left
2 additions and 2 deletionsapps/web/src/connection/platform.tsModified
View file
@@ -812,11 +812,11 @@
const layerRpcRequestObserver = Layer.succeed(
EnvironmentRpcRequestObserver,
EnvironmentRpcRequestObserver.of({
- observe: ({ environmentId, method }) =>
+ observe: ({ environmentId, environmentLabel, method }) =>
Effect.sync(() => {
nextObservedRpcRequestId += 1;
const requestId = `${environmentId}:${nextObservedRpcRequestId}`;
- trackRpcRequestSent(requestId, method, `${method} · ${environmentId}`);
+ trackRpcRequestSent(requestId, method, `${method} · ${environmentLabel}`);
return Effect.sync(() => {
acknowledgeRpcRequest(requestId);
});
8 additions and 5 deletionsapps/web/src/rpc/requestLatencyState.test.tsModified
View file
@@ -52,12 +52,15 @@
expect(getSlowRpcAckRequests()).toEqual([]);
});
​
- it("ignores usage summary requests", () => {
- trackRpcRequestSent("1", WS_METHODS.serverGetUsageSummary);
- vi.advanceTimersByTime(SLOW_RPC_ACK_THRESHOLD_MS * 2);
+ it.each([WS_METHODS.serverGetUsageSummary, WS_METHODS.serverReportClientActivity])(
+ "ignores background request %s",
+ (method) => {
+ trackRpcRequestSent("1", method);
+ vi.advanceTimersByTime(SLOW_RPC_ACK_THRESHOLD_MS * 2);