Skip to content

Commit

Permalink
Merge pull request #240 from liulanzheng/fix-sure
Browse files Browse the repository at this point in the history
fix sure file timeout, sync with tcmu timeout
  • Loading branch information
liulanzheng authored Jul 17, 2023
2 parents 3e6a1ce + 7d883b5 commit 4eee2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sure_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SureFile : public ForwardFile_Ownership {
uint64_t try_cnt = 0;
size_t got_cnt = 0;
auto time_st = photon::now;
while (m_ifile && m_ifile->m_status >= 0 && photon::now - time_st < 31 * 1000 * 1000) {
while (m_ifile && m_ifile->m_status >= 0 && photon::now - time_st < 1000UL * INT32_MAX) {
// exit on image in exit status, or timeout
ssize_t ret = m_file->pread((char *)buf + got_cnt, count - got_cnt, offset + got_cnt);
if (ret > 0)
Expand Down

0 comments on commit 4eee2a3

Please sign in to comment.