Skip to content

Commit

Permalink
Merge pull request #139 from SiaFoundation/fix-critical-shutdown
Browse files Browse the repository at this point in the history
Fix critical error in host API while shutting down
  • Loading branch information
lukechampine authored Jul 7, 2022
2 parents 5b50392 + 3cc34ef commit 7208954
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions modules/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,6 @@ func (h *Host) ConnectabilityStatus() modules.HostConnectabilityStatus {
// FinancialMetrics returns information about the financial commitments,
// rewards, and activities of the host.
func (h *Host) FinancialMetrics() modules.HostFinancialMetrics {
err := h.tg.Add()
if err != nil {
build.Critical("Call to FinancialMetrics after close")
}
defer h.tg.Done()
h.mu.RLock()
defer h.mu.RUnlock()
return h.financialMetrics
Expand Down

0 comments on commit 7208954

Please sign in to comment.