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

fix: http_file: Close upload cache on task exit #1348

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions packager/file/http_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ void HttpFile::ThreadMain() {
error_message);
}

// In some cases it is possible that the server has already closed the
// connection without reading the request body. This can for example happen
// when the server responds with a non-successful status code. In this case we
// need to make sure to close the upload cache here, otherwise some other
// thread may block forever on Flush().
upload_cache_.Close();
download_cache_.Close();
task_exit_event_.Notify();
}
Expand Down