Fixed issue with token renewal
@@ -621,6 +621,9 @@ public class ONetworkProtocolBinary extends ONetworkProtocol {
byte[] renewedToken = null;
if (connection != null && connection.getToken() != null) {
renewedToken = server.getTokenHandler().renewIfNeeded(connection.getToken());
+ if(renewedToken.length > 0) {
+ connection.setTokenBytes(renewedToken);
+ }
}
channel.writeBytes(renewedToken);
channel.writeByte((byte) requestType);
@@ -734,6 +737,9 @@ public class ONetworkProtocolBinary extends ONetworkProtocol {
byte[] renewedToken = null;
if (connection != null && connection.getToken() != null) {
renewedToken = server.getTokenHandler().renewIfNeeded(connection.getToken());
+ if(renewedToken.length > 0) {
+ connection.setTokenBytes(renewedToken);
+ }
}
channel.writeBytes(renewedToken);
channel.writeByte((byte) requestType);
