Skip to content
Browse files

fix: goroutine leak in lambda report (#512)

time.Tick leaks its goroutine since
it's not manageable. Instead, new ticker is
created and deferred to stop as soon as
function returns
  • Loading branch information...
ferhatelmas authored and tj committed Dec 25, 2017
1 parent c4e604d commit 15c99d2a577754b0c2d25dd86f8d64eaf8856112
Showing with 4 additions and 1 deletion.
  1. +4 −1 platform/lambda/stack/stack.go
@@ -370,7 +370,10 @@ func (s *Stack) report(states map[string]Status) error {
"complete": 0,

for range time.Tick(time.Second) {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()

for range ticker.C {
stack, err := s.getStack()

if util.IsNotFound(err) {

0 comments on commit 15c99d2

Please sign in to comment.
You can’t perform that action at this time.