diff options
| author | Will Hawkins <[email protected]> | 2023-07-14 11:02:56 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-07-14 11:05:55 -0400 |
| commit | d27187215da1930c43a22c542d18f7578671ed74 (patch) | |
| tree | 7add5e09413e9b0c6d93c87f5e5fc3a168dc2e33 | |
| parent | 0a4cc0474df9854851a95e1b283468d6d62344b8 (diff) | |
Use defer to unlock probe data point channel lock
This approach *seems* like a good idea.
Signed-off-by: Will Hawkins <[email protected]>
| -rw-r--r-- | rpm/rpm.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -287,6 +287,7 @@ func ResponsivenessProber[BucketType utilities.Number]( } dataPointsLock.Lock() + defer dataPointsLock.Unlock() // Now we have our four data points (three in the foreign probe data point and one in the self probe data point) if dataPoints != nil { measurement := ResponsivenessProbeResult{ @@ -298,7 +299,6 @@ func ResponsivenessProber[BucketType utilities.Number]( Measure: utilities.Some[ResponsivenessProbeResult](measurement), } } - dataPointsLock.Unlock() }() } if debug.IsDebug(debugging.Level) { |
