Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): reopening Connections picks up new network addresses #15840

Mergedlnieuwenhuis(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/15840/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 99 additions and 13 deletions.

x
0 of 2 viewed, 2 left
64 additions and 2 deletionsapps/desktop/src/backend/DesktopServerExposure.test.tsModified
View file
@@ -40,7 +40,7 @@
],
};
​
-function layerMockSpawner(statusJson = "{}", onSpawn?: () => void) {
+function layerMockSpawner(statusJson: string | (() => string) = "{}", onSpawn?: () => void) {
return Layer.succeed(
ChildProcessSpawner.ChildProcessSpawner,
ChildProcessSpawner.make(() =>
@@ -53,7 +53,9 @@
kill: () => Effect.void,
unref: Effect.succeed(Effect.void),
stdin: Sink.drain,
- stdout: Stream.make(encoder.encode(statusJson)),
+ stdout: Stream.make(
+ encoder.encode(typeof statusJson === "string" ? statusJson : statusJson()),
+ ),
stderr: Stream.empty,
all: Stream.empty,
getInputFd: () => Sink.drain,
@@ -460,6 +462,66 @@
​
+ it.effect(
+ "refreshes Tailscale status when addresses change and caches unchanged addresses",
+ () => {
+ const networkInterfaces: Record<