Skip to content

Commit 5c24d07

Browse files
committed
add comment when successfully reinit'd
1 parent 129b16d commit 5c24d07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

coderd/tailnet.go

+6
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ func (s *ServerTailnet) getAgentConn() tailnet.MultiAgentConn {
248248
}
249249

250250
func (s *ServerTailnet) reinitCoordinator() {
251+
start := time.Now()
251252
for retrier := retry.New(25*time.Millisecond, 5*time.Second); retrier.Wait(s.ctx); {
252253
s.nodesMu.Lock()
253254
agentConn, err := s.getMultiAgent(s.ctx)
@@ -265,6 +266,11 @@ func (s *ServerTailnet) reinitCoordinator() {
265266
s.logger.Warn(s.ctx, "resubscribe to agent", slog.Error(err), slog.F("agent_id", agentID))
266267
}
267268
}
269+
270+
s.logger.Info(s.ctx, "successfully reinitialized multiagent",
271+
slog.F("agents", len(s.agentConnectionTimes)),
272+
slog.F("took", time.Since(start)),
273+
)
268274
s.nodesMu.Unlock()
269275
return
270276
}

0 commit comments

Comments
 (0)