fixed session clean up breaking distributed tests
@@ -128,7 +128,9 @@ public class OClientConnectionManager {
}
iterator.remove();
} else if (Boolean.TRUE.equals(entry.getValue().getTokenBased())) {
- if (entry.getValue().getToken() != null && !entry.getValue().getToken().isNowValid()) {
+ if (entry.getValue().getToken() != null
+ && !entry.getValue().getToken().isNowValid()
+ && !entry.getValue().getToken().getIsValid()) {
// Close the current session but not the network because can be used by another
// session.
removeConnectionFromSession(entry.getValue());
