-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix ring buffer panic #1556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix ring buffer panic #1556
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,10 @@ import ( | |
| // The function uses a ring buffer to efficiently store only the last maxJobLogLines lines. | ||
| // If the response contains more lines than maxJobLogLines, only the most recent lines are kept. | ||
| func ProcessResponseAsRingBufferToEnd(httpResp *http.Response, maxJobLogLines int) (string, int, *http.Response, error) { | ||
| if maxJobLogLines > 100000 { | ||
| maxJobLogLines = 100000 | ||
| } | ||
|
Comment on lines
+29
to
+31
|
||
|
|
||
| lines := make([]string, maxJobLogLines) | ||
| validLines := make([]bool, maxJobLogLines) | ||
| totalLines := 0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.