boglesby commented on a change in pull request #7416: URL: https://github.com/apache/geode/pull/7416#discussion_r821946159
########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java ########## @@ -432,34 +443,32 @@ protected void runDispatcher() { _messageQueue.remove(); clientMessage = null; } catch (AuthenticationExpiredException expired) { - if (waitForReAuthenticationStartTime == -1) { - waitForReAuthenticationStartTime = System.currentTimeMillis(); - // only send the message to clients who can handle the message - if (getProxy().getVersion().isNewerThanOrEqualTo(RE_AUTHENTICATION_START_VERSION)) { - EventID eventId = createEventId(); - sendMessageDirectly(new ClientReAuthenticateMessage(eventId)); - } - // We wait for all versions of clients to re-authenticate. For older clients we still - // wait, just in case client will perform some operations to - // trigger credential refresh on its own. - Thread.sleep(200); - } else { + waitForReAuthenticationStartTime = System.currentTimeMillis(); + // only send the message to clients who can handle the message + if (getProxy().getVersion().isNewerThanOrEqualTo(RE_AUTHENTICATION_START_VERSION)) { + EventID eventId = createEventId(); + sendMessageDirectly(new ClientReAuthenticateMessage(eventId)); + } + // We wait for all versions of clients to re-authenticate. For older clients we still + // wait, just in case client will perform some operations to + // trigger credential refresh on its own. + synchronized (re_auth_lock) { Review comment: I'm not sure. I was just thinking if a GC occurs after the message has been sent but before the wait occurs, it might miss it. I guess the GC would also cause the PutUserCredentials message from the client to not be processed either. So, I guess this is a non-issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org