refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-12-22 11:22:02 -06:00
parent 9489609b61
commit 9d873c0147

View File

@ -280,7 +280,10 @@ void open_file_base::reset_timeout() {
auto open_file_base::set_api_error(const api_error &err) -> api_error { auto open_file_base::set_api_error(const api_error &err) -> api_error {
mutex_lock error_lock(error_mtx_); mutex_lock error_lock(error_mtx_);
if (error_ != err) { if (error_ == err) {
return error_;
}
return ((error_ = (error_ == api_error::success || return ((error_ = (error_ == api_error::success ||
error_ == api_error::download_incomplete || error_ == api_error::download_incomplete ||
error_ == api_error::download_stopped error_ == api_error::download_stopped
@ -288,9 +291,6 @@ auto open_file_base::set_api_error(const api_error &err) -> api_error {
: error_))); : error_)));
} }
return error_;
}
void open_file_base::set_api_path(const std::string &api_path) { void open_file_base::set_api_path(const std::string &api_path) {
recur_mutex_lock file_lock(file_mtx_); recur_mutex_lock file_lock(file_mtx_);
fsi_.api_path = api_path; fsi_.api_path = api_path;