mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 08:37:36 -04:00
fixed bug in SQL access where timeout was compared to a negative value
This commit is contained in:
parent
09fe628415
commit
f59193b625
1 changed files with 3 additions and 5 deletions
|
@ -185,7 +185,7 @@ bool RetroDb::execSQL(const std::string &query){
|
||||||
|
|
||||||
|
|
||||||
uint32_t delta = 3;
|
uint32_t delta = 3;
|
||||||
rstime_t stamp = time(NULL), now = 0;
|
rstime_t stamp = time(NULL);
|
||||||
bool timeOut = false, ok = false;
|
bool timeOut = false, ok = false;
|
||||||
|
|
||||||
while(!timeOut){
|
while(!timeOut){
|
||||||
|
@ -202,10 +202,8 @@ bool RetroDb::execSQL(const std::string &query){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
now = time(NULL);
|
if(time(NULL) > stamp + TIME_LIMIT)
|
||||||
delta = stamp - now;
|
{
|
||||||
|
|
||||||
if(delta > TIME_LIMIT){
|
|
||||||
ok = false;
|
ok = false;
|
||||||
timeOut = true;
|
timeOut = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue