fix: stop dropping error log on context canceled after heartbeat (#9427)

Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
Spike Curtis
2023-08-30 14:44:00 +04:00
committed by GitHub
parent 3e67d8fa6a
commit a415395e9e
+3
View File
@@ -1365,6 +1365,9 @@ func (h *heartbeats) sendBeats() {
func (h *heartbeats) sendBeat() {
_, err := h.store.UpsertTailnetCoordinator(h.ctx, h.self)
if xerrors.Is(err, context.Canceled) {
return
}
if err != nil {
h.logger.Error(h.ctx, "failed to send heartbeat", slog.Error(err))
h.failedHeartbeats++