Logoff is not working

Hi,

We have recently upgraded wildfly from 23 to 26 and keycloak from 16 to 19.
We have around 10 diff application. The logout code is same for all

@Override
public void invalidateSession(HttpServletRequest request) {
if (“KEYCLOAK”.equals(request.getAuthType())) {
try {
request.logout();
} catch (Exception e) {
// ignore
}
}
// If a session exists, invalidate it.
HttpSession session = request.getSession(false);
if (session != null) {
try {
session.invalidate();
} catch (IllegalStateException e) {
// ignore
}
}
}

The logout is happening for all application expect 2 application.
In this one applictaion using structs and other one is spring.

There is no difference in the log statements "in successful" and "failure sceanrio". No error, no exception.
In keycloak, the  session  is still active when we do logoff.  Basically request.logout() is not happening in the above code.
Anyone faced similar issue. 

Before upgrading, logout was working properly.