Loading src/backends/file.cpp +8 −2 Changes for src/backends/file.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ *******************************************************************************/ #include <cstring> #include <cerrno> #include <sstream> #include <exception> #include <vector> Loading Loading @@ -259,7 +260,10 @@ void authdb::File::lock(){ if (_LockDes == INVALID_HANDLE_VALUE) { if (attempt > 100) { throw AuthBackendError("couldn't open lockfile: too many retries"); DWORD error = GetLastError(); std::string err = "couldn't open lockfile '" + _lockFile + "': too many retries (error code: " + std::to_string(error) + ")"; throw AuthBackendError(err.c_str()); } Sleep(10); continue; Loading Loading @@ -305,7 +309,9 @@ void authdb::File::lock(){ if(_LockDes<0){ if(attempt > 100){ throw AuthBackendError("couldn't open lockfile: too many retries"); std::string err = "couldn't open lockfile '" + _lockFile + "': too many retries (" + strerror(errno) + ")"; throw AuthBackendError(err.c_str()); } usleep(10000); continue; Loading Loading
src/backends/file.cpp +8 −2 Changes for src/backends/file.cpp: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ *******************************************************************************/ #include <cstring> #include <cerrno> #include <sstream> #include <exception> #include <vector> Loading Loading @@ -259,7 +260,10 @@ void authdb::File::lock(){ if (_LockDes == INVALID_HANDLE_VALUE) { if (attempt > 100) { throw AuthBackendError("couldn't open lockfile: too many retries"); DWORD error = GetLastError(); std::string err = "couldn't open lockfile '" + _lockFile + "': too many retries (error code: " + std::to_string(error) + ")"; throw AuthBackendError(err.c_str()); } Sleep(10); continue; Loading Loading @@ -305,7 +309,9 @@ void authdb::File::lock(){ if(_LockDes<0){ if(attempt > 100){ throw AuthBackendError("couldn't open lockfile: too many retries"); std::string err = "couldn't open lockfile '" + _lockFile + "': too many retries (" + strerror(errno) + ")"; throw AuthBackendError(err.c_str()); } usleep(10000); continue; Loading