From 7b26d98453cc07f05b65bfdea89a57c6ec75daa2 Mon Sep 17 00:00:00 2001 From: Andrew Cholakian Date: Mon, 7 Jan 2019 10:53:22 -0800 Subject: [PATCH] [Heartbeat] Clean up some nits from Explicit IDs (9697) (#9926) This cleans up a couple small points missed in #9697 --- heartbeat/monitors/monitor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/heartbeat/monitors/monitor.go b/heartbeat/monitors/monitor.go index 73cf3effdf0b..ff7ac510b6d0 100644 --- a/heartbeat/monitors/monitor.go +++ b/heartbeat/monitors/monitor.go @@ -309,7 +309,7 @@ func (m *Monitor) Stop() { defer m.internalsMtx.Unlock() // Free up the monitor ID for reuse - uniqueMonitorIDs.Delete(m.id) + defer uniqueMonitorIDs.Delete(m.id) for _, t := range m.configuredJobs { t.Stop() @@ -329,7 +329,8 @@ func WithMonitorMeta(id string, name string, typ string, origJob Job) Job { "monitor": common.MapStr{ "id": id, "name": name, - "type": typ}, + "type": typ, + }, }, origJob, )