Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): a new pairing replaces the login on an environment's other addresses #36310

Openjuliusmarmingewants to merge 1 commit intomain fromrefs/pull/36310/headopened View on GitHub

Showing 5 changed files with 55 additions and 13 deletions (loading 2).

x
0 of 5 viewed, 5 left
17 additions and 2 deletionspackages/client-runtime/src/connection/registry.test.tsModified
View file
@@ -2064,9 +2064,24 @@
it.effect("re-pairing the same address replaces that route rather than adding another", () =>
Effect.gen(function* () {
+ // Borrows the login saved under the old route id, which goes away with that route.
+ const learnedId = `learned:${LAN_TARGET.environmentId}:http://100.101.102.103:3773@${LAN_TARGET.connectionId}`;
const harness = yield* makeHarness(
- [LAN_TARGET, RELAY_TARGET],
- [LAN_PROFILE],
+ [
+ LAN_TARGET,
+ new BearerConnectionTarget({ ...LAN_TARGET, connectionId: learnedId }),
+ RELAY_TARGET,
+ ],
+ [
+ LAN_PROFILE,
+ new BearerConnectionProfile({
+ ...LAN_PROFILE,
+ connectionId: learnedId,
+ httpBaseUrl: "http://100.101.102.103:3773/",
+ wsBaseUrl: "ws://100.101.102.103:3773/",
+ learned: true,
+ }),
+ ],
[[LAN_TARGET.connectionId, BEARER_CREDENTIAL]],
yield* Effect.gen(function* () {
6 additions and 5 deletionspackages/client-runtime/src/connection/registry.tsModified
View file