mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
fixed bug in SQL access where timeout was compared to a negative value
This commit is contained in:
parent
09fe628415
commit
f59193b625
@ -185,7 +185,7 @@ bool RetroDb::execSQL(const std::string &query){
|
||||
|
||||
|
||||
uint32_t delta = 3;
|
||||
rstime_t stamp = time(NULL), now = 0;
|
||||
rstime_t stamp = time(NULL);
|
||||
bool timeOut = false, ok = false;
|
||||
|
||||
while(!timeOut){
|
||||
@ -202,10 +202,8 @@ bool RetroDb::execSQL(const std::string &query){
|
||||
break;
|
||||
}
|
||||
|
||||
now = time(NULL);
|
||||
delta = stamp - now;
|
||||
|
||||
if(delta > TIME_LIMIT){
|
||||
if(time(NULL) > stamp + TIME_LIMIT)
|
||||
{
|
||||
ok = false;
|
||||
timeOut = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user