Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #332 from docker/feat-sleep-ctx
Browse files Browse the repository at this point in the history
Sleep cancel sleep on log follow if the user cancels
  • Loading branch information
rumpl authored Jul 3, 2020
2 parents c903362 + 0057093 commit 1b9dd7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion azure/aci.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ func streamLogs(ctx context.Context, aciContext store.AciContext, containerGroup
fmt.Fprintln(out, logLines[i])
}

time.Sleep(2 * time.Second)
select {
case <-ctx.Done():
return nil
case <-time.After(2 * time.Second):
}
}
}
}
Expand Down

0 comments on commit 1b9dd7a

Please sign in to comment.