Sleep cancel sleep on log follow if the user cancels

This commit is contained in:
Djordje Lukic 2020-07-03 10:49:57 +02:00
parent ae76e0cf27
commit 0057093897
1 changed files with 5 additions and 1 deletions

View File

@ -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):
}
}
}
}