fix optimization for avoid encryption check of token for each request
@@ -95,10 +95,10 @@ public class OClientConnection {
@Override
public String toString() {
- return "OClientConnection [id=" + getId() + ", source="
- + (getProtocol() != null && getProtocol().getChannel() != null && getProtocol().getChannel().socket != null
- ? getProtocol().getChannel().socket.getRemoteSocketAddress() : "?")
- + ", since=" + getSince() + "]";
+ return "OClientConnection [id=" + getId() + ", source=" + (
+ getProtocol() != null && getProtocol().getChannel() != null && getProtocol().getChannel().socket != null ?
+ getProtocol().getChannel().socket.getRemoteSocketAddress() :
+ "?") + ", since=" + getSince() + "]";
}
/**
@@ -161,7 +161,7 @@ public class OClientConnection {
} else {
// IF the byte from the network are the same of the one i have a don't check them
if (tokenBytes != null && tokenBytes.length > 0) {
- if (tokenBytes.equals(tokenFromNetwork)) // SAME SESSION AND TOKEN DO
+ if (Arrays.equals(tokenBytes, tokenFromNetwork)) // SAME SESSION AND TOKEN NO NEED CHECK VALIDITY
return;
}
