Closed
Description
Panic under rPTY traffic with single_tailnet enabled.
Logs: https://cloudlogging.app.goo.gl/bTGg3wyNM8iLf6nY7
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x137db65]
goroutine 286 [running]:
github.com/coder/coder/v2/tailnet.(*MultiAgent).UnsubscribeAgent(0xfd7a115ca1e04c18?, {0xa, 0xd1, 0x65, 0xf4, 0x9f, 0x48, 0x4c, 0x18, 0xac, ...})
/home/runner/actions-runner/_work/coder/coder/tailnet/multiagent.go:104 +0xc5
github.com/coder/coder/v2/coderd.(*ServerTailnet).doExpireOldAgents(0xc0001af040, 0x1a3185c5000)
/home/runner/actions-runner/_work/coder/coder/coderd/tailnet.go:205 +0x72f
github.com/coder/coder/v2/coderd.(*ServerTailnet).expireOldAgents(0xc0001af040)
/home/runner/actions-runner/_work/coder/coder/coderd/tailnet.go:172 +0x92
created by github.com/coder/coder/v2/coderd.NewServerTailnet
/home/runner/actions-runner/_work/coder/coder/coderd/tailnet.go:152 **+0xc9f**