Skip to content

fix: agent panics on closed network #5295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix
  • Loading branch information
mtojek committed Dec 5, 2022
commit 004ebbd540c735ef90f48e6640e0a1a186f506b7
3 changes: 1 addition & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ func (a *agent) createTailnet(ctx context.Context, derpMap *tailcfg.DERPMap) (_
a.closeMutex.Unlock()
return nil, xerrors.New("closed")
}
var network *tailnet.Conn
network, err = tailnet.NewConn(&tailnet.Options{
network, err := tailnet.NewConn(&tailnet.Options{
Addresses: []netip.Prefix{netip.PrefixFrom(codersdk.TailnetIP, 128)},
DERPMap: derpMap,
Logger: a.logger.Named("tailnet"),
Expand Down