Skip to content

Commit

Permalink
Update SyncConnection.java
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
vchangpengfei authored Dec 22, 2021
1 parent 486f4b4 commit be8c301
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public AuthResult authenticate(String user, String password)
public AuthResult authenticate(String user, String password,int timeout)
throws AuthFailedException, IOErrorException, ClientServerIncompatibleException {
try {
if (timeout>0) {
if (timeout > 0) {
this.transport.setTimeout(timeout);
}
AuthResponse resp = client.authenticate(user.getBytes(), password.getBytes());
Expand Down Expand Up @@ -164,7 +164,7 @@ public AuthResult authenticate(String user, String password,int timeout)
}
throw new AuthFailedException(String.format("Authenticate failed: %s", e.getMessage()));
} finally {
if (timeout>0) {
if (timeout > 0) {
this.transport.setTimeout(this.timeout);
}
}
Expand All @@ -178,7 +178,7 @@ public ExecutionResponse execute(long sessionID, String stmt)
public ExecutionResponse execute(long sessionID, String stmt,int timeout)
throws IOErrorException {
try {
if (timeout>0) {
if (timeout > 0) {
this.transport.setTimeout(timeout);
}
return client.execute(sessionID, stmt.getBytes());
Expand All @@ -201,7 +201,7 @@ public ExecutionResponse execute(long sessionID, String stmt,int timeout)
}
throw new IOErrorException(IOErrorException.E_UNKNOWN, e.getMessage());
} finally {
if (timeout>0) {
if (timeout > 0) {
this.transport.setTimeout(this.timeout);
}
}
Expand Down

0 comments on commit be8c301

Please sign in to comment.