[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: Tomcat 7.0.48-dev WebSockets: NullPointerException on WsServerContainer.unregisterAuthenticatedS
From:       Francesco Bassi <fvbassi () gmail ! com>
Date:       2013-11-28 14:52:18
Message-ID: CAO-0eLg81-TU2zJrE2nrxNDFG=Hus1ziGm5aWgfq_mtKm0SzJg () mail ! gmail ! com
[Download RAW message or body]


Thanks a lot for your prompt support.
Definitely a serious reason not to switch to any other application server!


On Thu, Nov 28, 2013 at 3:29 PM, Mark Thomas <markt@apache.org> wrote:

> On 28/11/2013 14:06, Francesco Bassi wrote:
> > Hello everybody.
> >
> > I have a doubt:
> >
> > whenever the HttpSession expires, I get a NullPointerException on
> > WsServerContainer.unregisterAuthenticatedSession
> >
> > in this line:
> >
> >     private void unregisterAuthenticatedSession(WsSession wsSession,
> >             String httpSessionId) {
> >         Set<WsSession> wsSessions =
> > authenticatedSessions.get(httpSessionId);
> > -->        wsSessions.remove(wsSession);
> >     }
> >
> >
> > The quick fix is obvious:
> >
> >     private void unregisterAuthenticatedSession(WsSession wsSession,
> >             String httpSessionId) {
> >         Set<WsSession> wsSessions =
> > authenticatedSessions.get(httpSessionId);
> >         if(wsSessions!=null) wsSessions.remove(wsSession);
> >     }
> >
> > but I suspect that the error is elsewhere.
> >
> > What do you think?
>
> The quick fix looks like the right fix to me.
>
> I've applied the fix to trunk for 8.0.0-RC6 and 7.0.x for 7.0.48.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic