diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-08-15 14:59:56 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-08-15 14:59:56 -0300 |
| commit | 783578d28ec6f7d61e7a4b55c608f4f54b725df7 (patch) | |
| tree | bf7e1868b73a662c2fbf5cef9e0a0cc071c6e4b4 /src/query.cc | |
| parent | baaeac349dc5da2cb4892662c69566a98a66a124 (diff) | |
| download | login-783578d28ec6f7d61e7a4b55c608f4f54b725df7.tar.gz login-783578d28ec6f7d61e7a4b55c608f4f54b725df7.zip | |
wrapping up for a public release
Diffstat (limited to 'src/query.cc')
| -rw-r--r-- | src/query.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/query.cc b/src/query.cc index 1335631..21d44ec 100644 --- a/src/query.cc +++ b/src/query.cc @@ -147,7 +147,7 @@ int ExecuteQuery(TQueryManagerConnection *Connection, bool AutoReconnect, } const int MaxAttempts = 2; - for(int Attempts = 0; true; Attempts += 1){ + for(int Attempt = 1; true; Attempt += 1){ int WriteSize = WriteBuffer->Position; if(!IsConnected(Connection)){ if(!AutoReconnect){ @@ -173,7 +173,7 @@ int ExecuteQuery(TQueryManagerConnection *Connection, bool AutoReconnect, if(!WriteExact(Connection->Socket, Connection->Buffer, WriteSize)){ Disconnect(Connection); - if(Attempts >= MaxAttempts){ + if(Attempt >= MaxAttempts){ LOG_ERR("Failed to write request"); return QUERY_STATUS_FAILED; } @@ -183,7 +183,7 @@ int ExecuteQuery(TQueryManagerConnection *Connection, bool AutoReconnect, uint8 Help[4]; if(!ReadExact(Connection->Socket, Help, 2)){ Disconnect(Connection); - if(Attempts >= MaxAttempts){ + if(Attempt >= MaxAttempts){ LOG_ERR("Failed to read response size"); return QUERY_STATUS_FAILED; } |
