Skip to content

Commit

Permalink
return as well (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
levrado committed Dec 10, 2018
1 parent f2ebdd9 commit d20d071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/platform/kube/scaler/autoscaler.go
Expand Up @@ -47,7 +47,7 @@ func newAutoScaler(parentLogger logger.Logger,
metricName: metricName,
windowSize: windowSize,
scaleInterval: scaleInterval,
metricsChannel: make(chan metricEntry),
metricsChannel: make(chan metricEntry, 1024),
}, nil
}

Expand Down Expand Up @@ -139,6 +139,7 @@ func (as *autoscaler) reportMetric(metric metricEntry) error {
// don't block, try and fail fast
select {
case as.metricsChannel <- metric:
return nil
default:
as.logger.WarnWith("Failed to report metric",
"functionName", metric.functionName,
Expand Down

0 comments on commit d20d071

Please sign in to comment.