Exception in logout action when using custom authentication

Hi,

I’m implementing a custom authentication using a SSO solution based on Shibboleth.
I’m getting a WARN exception during the logout action (in my plugin I overrided the checkAuth method):
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
java.lang.IllegalStateException: Cannot create a session after the response has been committed

at row 57 of LogoutAction class:
Xwiki Logout Class example

Can this error be dangerous or can I skip it since the logout action seems to work well?
Thank you for support.
Kind regards

Just in case someone else is having this issue, I solved this way:

Override the response class and sendRedirect method:
XWikiResponse wrapper = new XWikiServletResponse(context.getResponse().getHttpServletResponse()) {

				 @Override
				 public void sendRedirect(String location) throws IOException {

					 super.sendRedirect(logoutUrl);
				 }
				 };

The problem was that XWiki already does a logout redirect when user clicks on “logout” action, in my case I wanted to use a custom redirection in order to use my own logout url, that’s the error (you can’t do two subsequent redirect operations).
I rewrote the method that XWiki uses for logging out and it works.
Regards.