File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -156,9 +156,17 @@ bool CrorcBar::checkLinkUp()
156156
157157void CrorcBar::assertLinkUp ()
158158{
159- auto timeOut = std::chrono::steady_clock::now () + std::chrono::milliseconds (100 );
160- while ((std::chrono::steady_clock::now () < timeOut) && !checkLinkUp ()) {
159+ int checkTimes = 1000 ;
160+ auto timeOut = std::chrono::steady_clock::now () + std::chrono::milliseconds (2000 );
161+ while ((std::chrono::steady_clock::now () < timeOut) && checkTimes) {
162+ if (checkLinkUp ()) {
163+ checkTimes--;
164+ } else {
165+ checkTimes = 1000 ;
166+ }
161167 }
168+
169+ std::this_thread::sleep_for (500ms);
162170 if (!checkLinkUp ()) {
163171 BOOST_THROW_EXCEPTION (CrorcCheckLinkException () << ErrorInfo::Message (" Link was not up" ));
164172 }
You can’t perform that action at this time.
0 commit comments