Skip to content

Commit

Permalink
Fix: syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
watermelo committed Sep 9, 2020
1 parent a58d832 commit a7d5508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cluster/router/healthcheck/default_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

func init() {
extension.SethealthChecker(constant.DEFAULT_HEALTH_CHECKER, NewDefaultHealthChecker)
extension.SetHealthChecker(constant.DEFAULT_HEALTH_CHECKER, NewDefaultHealthChecker)
}

// DefaultHealthChecker is the default implementation of HealthChecker, which determines the health status of
Expand Down Expand Up @@ -85,7 +85,7 @@ func (c *DefaultHealthChecker) getCircuitBreakerSleepWindowTime(status *protocol
} else if diff > constant.DEFAULT_SUCCESSIVE_FAILED_REQUEST_MAX_DIFF {
diff = constant.DEFAULT_SUCCESSIVE_FAILED_REQUEST_MAX_DIFF
}
sleepWindow := (1 << diff) * c.GetCircuitTrippedTimeoutFactor()
sleepWindow := (1 << uint(diff)) * c.GetCircuitTrippedTimeoutFactor()
if sleepWindow > constant.MAX_CIRCUIT_TRIPPED_TIMEOUT_IN_MS {
sleepWindow = constant.MAX_CIRCUIT_TRIPPED_TIMEOUT_IN_MS
}
Expand Down

0 comments on commit a7d5508

Please sign in to comment.