ipn: define NewBackendServer nil as not affecting Backend's NotifyCallback

Updates tailscale/corp#1646

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-22 15:47:28 -07:00
parent 30629c430a
commit 8a449c4dcd
2 changed files with 13 additions and 1 deletions

View File

@@ -87,6 +87,8 @@ func TestClientServer(t *testing.T) {
t.Logf("c: "+fmt, args...)
}
bs = NewBackendServer(slogf, b, serverToClient)
// Verify that this doesn't break bs's callback:
NewBackendServer(slogf, b, nil)
bc = NewBackendClient(clogf, clientToServer)
ch := make(chan Notify, 256)