We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4183c5e commit d84d792Copy full SHA for d84d792
agent/agent.go
@@ -288,6 +288,8 @@ func (a *agent) runCoordinator(ctx context.Context) {
288
a.logger.Warn(context.Background(), "failed to dial", slog.Error(err))
289
continue
290
}
291
+ //nolint:revive // Defer is ok because we're exiting this loop.
292
+ defer coordinator.Close()
293
a.logger.Info(context.Background(), "connected to coordination server")
294
break
295
@@ -296,7 +298,6 @@ func (a *agent) runCoordinator(ctx context.Context) {
296
298
return
297
299
default:
300
- defer coordinator.Close()
301
sendNodes, errChan := tailnet.ServeCoordinator(coordinator, a.network.UpdateNodes)
302
a.network.SetNodeCallback(sendNodes)
303
select {
0 commit comments