Skip to content
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

Fixed panic generated on closed xferDone channel. #2874

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ste/mgr-JobMgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,9 @@ func (jm *jobMgr) reportJobPartDoneHandler() {
(isCancelling && !haveFinalPart) // If we're cancelling, it's OK to try to exit early; the user already accepted this job cannot be resumed. Outgoing requests will fail anyway, so nothing can properly clean up.
if shouldComplete {
// Inform StatusManager that all parts are done.
close(jm.jstm.xferDone)
if jm.jstm.xferDone != nil {
close(jm.jstm.xferDone)
}

// Wait for all XferDone messages to be processed by statusManager. Front end
// depends on JobStatus to determine if we've to quit job. Setting it here without
Expand Down
Loading